Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Key Fields
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00008101
Message ID:
00008187
Views:
39
>>>
>>> >>>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
>
>U got it. That's why I am currently using a character!

i also use a char string -- was just curious.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform