Tag Archives: Statistics

Identifying Overlapping Statistics

Hav­ing both auto cre­ated stat­ist­ics and index stat­ist­ics on the same column caused the query optim­izer to choose a dif­fer­ent — and less than optim­al — exe­cu­tion plan than when only the index stat­ist­ics exis­ted. From Author : Kend­al Van Dyke http://​sqlserver​pedia​.com/​b​l​o​g​/​s​q​l​—​s​e​r​v​e​r​—​2​0​0​5​/​t​u​n​i​n​g​—​t​i​p​—​i​d​e​n​t​i​f​y​i​n​g​—​o​v​e​r​l​a​p​p​i​n​g​—​s​t​a​t​i​s​t​i​cs/ WITH auto­stats ( object_​id, stats_​id, name, column_​id ) AS ( SELECT sys.stats.object_id , sys.stats.stats_id […]