Printed 2015/10/08 12:52PM

Select count(*)

By Vinay Thakur-585143, 2009/10/09


Today I was reading(I always read Paul Randal).

I learned that whenever you query select count(*) it will select the the best plan... as

if no index ---no option -table scan

INDEX: choose the smallest possible index(if has multiple index) to achieve the lowest I/O cost.

you can also test this with

set statistics io on



Copyright © 2002-2015 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.