Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL SELECT clause tuning

Tags:

sql

sql-tuning

Why does the sql query execute faster if I use the actual column names in the SELECT statement instead of SELECT *?

like image 653
Liran Ben Yehuda Avatar asked Aug 23 '26 00:08

Liran Ben Yehuda


1 Answers

A noticeable difference at all seems odd... since I'd expect it to be a very minuscule difference and am intrigued to test it out.

Any difference might in a statement using Select * might be due to it taking extra time to find out what all of the column names are.

like image 157
Tim Avatar answered Aug 25 '26 14:08

Tim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!