Printed 2017/07/25 11:05AM

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-2017 Redgate. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.