Reputation: 1291
For example, I have a database like this:
id | fname | lname | sex | age | tel | cell | address
If I do select cell, fname, address, sex
instead of doing select fname, sex, cell, address
, will that affect the speed of query, in big tables?
I did a quick check in phpmyadmin and it appeared to be taking same time, but I wanted to double check.
Thanks.
Upvotes: 4
Views: 345
Reputation:
Another thing that will make it run faster is creating indexes on the fields that you will be searching the most.
Upvotes: 1
Reputation: 887215
That won't make any difference.
However, omitting columns from the SELECT
clause will make it run faster since it'll send less data over the network.
Upvotes: 9