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
5507
July 10, 2014 12:15PM
Re: Select * vs Select Columns
2805
July 13, 2014 04:50PM
2071
July 14, 2014 10:19AM
2188
July 14, 2014 10:23AM
2278
July 14, 2014 11:16AM
2170
July 14, 2014 11:20AM
2237
July 14, 2014 01:37PM
2097
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.