Subject | Re: [ib-support] some index questions |
---|---|
Author | Nando Dessena |
Post date | 2001-11-19T10:57:08Z |
Tom,
relational mapping of data calls for surrogated identifiers. With IB you
won't have any problems using them. You will almost certainly see speed
improvements and many less headaches if you do.
exist.
you may need an index with ascending or descending direction to support
your queries. It very much depends on the SQL statements you use.
discussion topic.
Ciao
--
____
_/\/ando
> Is it always better to use a generated field as a primary key?.the latter was probably and ageing article. A modern approach to
> Let say that in a table you can create a primary key with the first 3
> or 4 fields, will this bring a speed reduction?
> Or is it just by experience that you better can use seperate (auto
> generated) primary keys. I've read books/articles and one says you
> need to use a generated key and another one says that if you can
> avoid a generated key, you need that one...
relational mapping of data calls for surrogated identifiers. With IB you
won't have any problems using them. You will almost certainly see speed
improvements and many less headaches if you do.
> if you create an index. no sorting order, will it than be slower thanAn index is by default ascending. An index with no sorting order cannot
> the same key with a descending or ascending order?
exist.
> So, if I need a descending and a descending order key for that field,Don't confuse indexes and keys. You don't need a key with a direction;
> then I create 2 keys (desc, asc) or 1 key with no order.
you may need an index with ascending or descending direction to support
your queries. It very much depends on the SQL statements you use.
> Is Firebird smart enough to use a key or do you always have toFirebird is smart enough. Whether it can be smarter or not is a frequent
> explecit say that it has to use that key.
discussion topic.
Ciao
--
____
_/\/ando