Which is faster: "SELECT * FROM table" or "SELECT x,y,q FROM table" (from a table with 4 fields)
database, mysql, php, sql
Solution
`SELECT x,y,z FROM table` is faster because MySQL won't have to look up what columns are in your table before executing the query.
Problem
I'm wondering, what is fastest (or lightest for the database to handle) Let's say, the db table has 4 fields: x,y,z,q I only need 3: x,y,q What way is fastest/easiest for the database to perform (using PHP).. "SELECT * FROM table" or "SELECT x,y,q FROM table"? Would the same apply if the table had 5 or more fields while I still only needed to select 3?