At 10:34 AM +0200 09-11-2000, Maximo Migliari wrote:
>I'm interested in finding out whether using char is better to using
>varchar on a system in which storage space is not of much concern.
>I know that, to a large extent, the speed of a select-type query is
>dependent on the size of the database. However, in the mySQL
>manual, using CHAR-type fields is considered better if you want to
>speed up queries. So which one is it, VARCHAR (making sure the
>record is the smalest in terms of size it can be), or CHAR (always a
>set size, but supposedly faster on queries) ???
The manual is correct for the general case.
If you want to know for your particular table, run your queries with
CHAR columns, then change the columns to VARCHAR and run your queries
>For example, I have a products table which is something like this:
>anyway, my image field, for example, will contain the URL of the
>image for this product, so it might be very short, i.e.
>or very long:
>so basically... what would be better?
>In fact, what I need to know is: will the speed decrease you get by
>using varchar's be compensated by the fact that the record will be
>as small as possible??
>Thanks in Advance,
Paul DuBois, paul@stripped