Thursday, April 3, 2014

Estimated and actual number of rows at filtered statistics

I have query like this:



SELECT productID FROM dbo.table WHERE nar_closed=1 AND nar_status=0

I have filtered index:



CREATE NONCLUSTERED INDEX [x_status] ON [dbo].[Table]
(nar_status ASC)
INCLUDE(productID)
WHERE nar_closed=1

In execution plan I can see that there is index seek - so optimal plan. But, estimated number of rows is 1716930 and actual number of rows is only 63260. How is that possible? I have rebuild index and statistic is up to date. Statistic is also filtered(like index). Is there some problem with filtered statistics?

What should i do, to get actual and estimated number of rows similar?


No comments:

Post a Comment