Which is faster/best? SELECT * or SELECT column1, colum2, column3, etc

后端 未结 30 3075
清歌不尽
清歌不尽 2020-11-21 23:59

I\'ve heard that SELECT * is generally bad practice to use when writing SQL commands because it is more efficient to SELECT columns you specificall

30条回答
  •  长发绾君心
    2020-11-22 00:39

    To add on to what everyone else has said, if all of your columns that you are selecting are included in an index, your result set will be pulled from the index instead of looking up additional data from SQL.

提交回复
热议问题