[thelist] MySQL oddness

Jeremy Weiss eccentric.one at gmail.com
Tue Jan 29 09:46:37 CST 2008


Quick question:

> BTW, rule #1 of writing decent SQL: Never use SELECT *
> This causes MySQL to first do a look up on all the columns of the table,
> before then using them in the SELECT statement. When you specify the
> columns, you firstly reduce the time it takes to execute the query and the
> load on the MySQL server, and secondly you narrow the data down to only
> that which you really need.

Does this rule apply even if you do need every column in a table?

-jeremy



More information about the thelist mailing list