Hi.
For what I know, MySQL always reads a whole row if it has to read the
row at all. So, no, column order should not matter at all.
With MyISAM tables, indexes are in a seperate file, build their own
way. So no, also no influence. I don't know enough about InnoDB to say
something for sure, but I think column order should not matter either.
IMHO, most potential for optimizing lies in a good choice of properly
indexes.
Bye,
Benujamin.
On Tue, Apr 09, 2002 at 03:50:52PM -0400, [EMAIL PROTECTED] wrote:
> Sorry, this came out ugly. I misinterpreted the list filter's
> comments, and thought it would post my original message if I replied
> to it, but instead it posted my reply including its warning.
>
> Here's my original question, which is indeed about MySQL, although it
> does not contain the words "SQL" or "query":
>
> Is there any reason to prefer a particular order of columns in a
> table?
>
> For example, will SELECTs be faster if the columns are requested in
> the same order they exist in the table? Is there a tendency for
> columns earlier in the table to be preferred in queries with complex
> WHERE clauses, so I should put columns which would be good candidates
> for using their index earlier in the database? Is there any inherent
> speed difference between earlier and later columns, for example
> earlier columns are always at the beginning of the record, and so
> won't require as much of the database file to be read to get their
> value for each row?
[...]
--
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php