>
> >>>I have a system where new records are being added to tables
> >>>and receive sequential ID numbers which are the primary
> >>>keys. Is there a difference between using numeric and
> >>>integer types for these fields?
> >>
> >>Consider using a character type for your system generated key? I used a system generated key in some tables that is C(4) and stored like
(0001, 0002, 0003).
> >
> >
> >which works faster w/ seeks, char, numeric or integer? i've read about studies on this but can't remember...
>
> Integer. Reason - Takes up only 4 bytes so that index files are smaller. Also, I believe I heard that the engine is optimized for
Integer keys (don't hold to
>
> -Doug-
To be on the safe side, I would go for a character key, be it only
because you might want to concatenate the key in a composite secundary
key, in which case, if you take an integer, you would loose the
advantage of optimization.
My 2 BEF.
Regards,
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.