Assume that you have Microsoft SQL Server 2016 installed with a partitioned table and statistics on a partitioned column. You run a query that filters on the partition column by using IS NULL and with the default Cardinality Estimator (CE). In this scenario, you may observe inaccurate cardinality estimations and SQL Server uses an inefficient query plan. The following are some queries with predicates:
SELECT *FROM [MyTable] WHERE [Column1]='SomeValue' AND [PartitionColumn] IS NULLOrSELECT * FROM [MyTable]WHERE $PARTITION.PF(PartitionColumn) = 1
This issue is fixed in the following cumulative update for SQL Server:
This fix requires one of the following to take effect:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.