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

后端 未结 30 3036
清歌不尽
清歌不尽 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:40

    The result is too huge. It is slow to generate and send the result from the SQL engine to the client.

    The client side, being a generic programming environment, is not and should not be designed to filter and process the results (e.g. the WHERE clause, ORDER clause), as the number of rows can be huge (e.g. tens of millions of rows).

提交回复
热议问题