开发者

Best way to select all records

开发者 https://www.devze.com 2023-03-25 06:49 出处:网络
Does anyone know a performance or any other benefit of using select(1) or select(*) over the other? I am looking to optimiz开发者_运维技巧e searchingThere are some instances it makes a difference...Th

Does anyone know a performance or any other benefit of using select(1) or select(*) over the other? I am looking to optimiz开发者_运维技巧e searching


There are some instances it makes a difference...The best thing to do is to look at the execution plan for your query using SELECT (1) and SELECT (*)

This post is also a good resource: http://blog.sqlauthority.com/2008/02/26/sql-server-select-1-vs-select-an-interesting-observation/


select 1 will transmit less data, so technically it's faster. Not sure how useful it is though.

0

精彩评论

暂无评论...
验证码 换一张
取 消