Re: CHAR or VARCHAR for Key Field?
Posted in 1998
Preston Carter wrote: > Somewhere along the way I got the idea that it's a bad > idea to use a VARCHAR as a key field; a fixed-length > (i.e. CHAR) field is faster, indexes better. Is this > correct? I couldn't find any support for this notion > in any of the printed materials or in the FAQ. I don't know if this is still true in 7.3. When I was doing customer service under 5.x, it seemed to be that whenever someone indexed on a VARCHAR column they might as well not have bothered indexing. I don't know if a bug was ever identified but based on this anectodal evidence, I tended to discourage my classes from soing so. I'd like to change my mind on this issue. I'd like to know if anyone has had better experiences recently. It seems a shame to not use VARHCAR on something like a name because the index search falls flat. -- -- Jake (Retrospectively realizes there is no future in hindsight) +------------------------------------------------------------+ | The expedient performance of a task with excessive concern | | regarding its duration-to-completion engenders a virtual | | certainty of diminished benefit therefrom. | | -- Benjamin Franklin (but he said it in 3 words) | +------------------------------------------------------------+