in reply to Re: Re: Re: selecting again from a mysql database
in thread selecting again from a mysql database
That's a reasonable example. It's still slower at the database level, though.This may depend on the actual database you are using. I suspect that unless the table is really wide the difference in speed at the database level between "select col, ..." and "select *" is really minimal.
After all, the SQL parser still has to resolve the columns that are passed in to the query and make sure that they exist, what type they are, etc.
That said I agree that "select *" should be avoided in anything but throwaway code as it is generally an indication that the programer doesn't have a clear idea of what s/he wants.
Michael
|
|---|