MySQL Forums
Forum List  »  Full-Text Search

Re: Select * vs Select Columns
Posted by: Rick James
Date: July 13, 2014 04:50PM

Run EXPLAIN SELECT ...; each way -- see if there is any difference.

Run EXPLAIN EXTENDED SELECT ...; immediately followed by SHOW WARNINGS; -- see if the converted SQL is any different.

SELECT * is turned into SELECT a,b,... -- so it cannot be any "better" than spelling out the fields yourself.

Since it is a JOIN, the fields will be come from all the tables.

If you run the identical SELECT twice in a row, the second one is likely to run faster simply because of caching. Did you eliminate this effect?

Options: ReplyQuote


Subject
Views
Written By
Posted
2844
July 10, 2014 12:15PM
Re: Select * vs Select Columns
1573
July 13, 2014 04:50PM
1325
July 14, 2014 10:19AM
1529
July 14, 2014 10:23AM
1439
July 14, 2014 11:16AM
1388
July 14, 2014 11:20AM
1470
July 14, 2014 01:37PM
1431
July 15, 2014 09:27PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.