Subject | some index questions |
---|---|
Author | zifnabbe@users.sourceforge.net |
Post date | 2001-11-19T10:00:04Z |
Hi,
Is it always better to use a generated field as a primary key?.
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...
Creating indexes:
if you create an index. no sorting order, will it than be slower than
the same key with a descending or ascending order?
So, if I need a descending and a descending order key for that field,
then I create 2 keys (desc, asc) or 1 key with no order.
Is Firebird smart enough to use a key or do you always have to
explecit say that it has to use that key.
Thanks in advance,
Tom
Is it always better to use a generated field as a primary key?.
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...
Creating indexes:
if you create an index. no sorting order, will it than be slower than
the same key with a descending or ascending order?
So, if I need a descending and a descending order key for that field,
then I create 2 keys (desc, asc) or 1 key with no order.
Is Firebird smart enough to use a key or do you always have to
explecit say that it has to use that key.
Thanks in advance,
Tom