If you are only selecting all columns from a table, using select * and select [columnnames].... will be the same.
It is generally a better idea to select the column names explicitly. Should a table receive an extra column it would be loaded with a select * call, where the extra column is not needed.
This can have several implications:
- More network traffic
- More I/O (got to read more data from disk)
- Possibly even more I/O (a covering index cannot be used - a table scan is performed to get the data)
- Possibly even more CPU (a covering index cannot be used so data needs sorting)
P.S. Please don't pressure for an answer (especially only one minute after asking). People answer as an when they can on this volunteer
Aug 31, 2010 at 12:43 AM