Subject Re: [ib-support] Re: Exists versus select first
Author Ann W. Harrison
At 02:24 PM 3/21/2002 -0300, Marcos Vinicius wrote:
>Tanks Ann and Andrew. By the way, speak about keys make I remember another
>question: Integers PKs are faster that varchar PKs? Same to indexes?

Primary keys are just indexes with some special handling, so
the same rules apply. The basic rule on index keys is that
a shorter key is faster than a longer key because more keys
fit on a page in the index. That becomes somewhat more complex
when you consider prefix compression. There's no difference
in length between an index on a long integer that contains
the values 1, 2, 3, 4, 5 and one that contains AAAAAAAA,
AAAAAAAB, AAAAAAAC, AAAAAAAD.


Pick values that make sense for your application.

Regards,

Ann
www.ibphoenix.com
We have answers.