Why Doesn’t Partition Elimination Work?

Posted by Paul White on SQL Blog See other posts from SQL Blog or by Paul White
Published on Tue, 11 Sep 2012 20:52:00 GMT Indexed on 2012/09/11 21:44 UTC
Read the original article Hit count: 654

Given a partitioned table and a simple SELECT query that compares the partitioning column to a single literal value, why does SQL Server read all the partitions when it seems obvious that only one partition needs to be examined? Sample Data The following script creates a table, partitioned on the char(3) column ‘Div’, and populates it with 100,000 rows of data: USE Sandpit; GO CREATE PARTITION FUNCTION PF ( char (3)) AS RANGE RIGHT FOR VALUES ( '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9'...(read more)

© SQL Blog or respective owner

Related posts about Conversions

Related posts about partitioning