Reputation: 4717
Using Azure Sql Database, SQL Server Management Studio V. 18.0 Preview 6 (though this problem existed when I was using v 17).
When viewing the execution plan against a partitioned table, the only partition related info I get when I view the properties of a partitioned clustered index seek is "Partitioned | True" (nothing in the XML version either). Nowhere do I see "Actual Partitions Accessed" as is pictured in this post (as example).
Why is it missing?
Upvotes: 0
Views: 591
Reputation: 4717
The answer was exceedingly simple; @MartinSmith comment (why can't I at mention here?) - include actual execution plan.
Upvotes: 0
Reputation: 36
This is strange, I’m using SSMS 18 Preview 7 and I get those properties on Azure and SQL 2019 (just as a quick test).
Azure:
SQL 2019:
Example I used:
CREATE PARTITION FUNCTION pf_test(INT)
AS RANGE RIGHT FOR VALUES (0)
CREATE PARTITION SCHEME ps_test
AS PARTITION pf_test ALL TO ([PRIMARY])
CREATE TABLE Foo
(
WorkItem INT NOT NULL
, Payload CHAR(300) NOT NULL DEFAULT REPLICATE ('X', 300)
) ON ps_test(WorkItem)
INSERT INTO Foo (WorkItem) VALUES (-1)
INSERT INTO Foo (WorkItem) VALUES (-1)
INSERT INTO Foo (WorkItem) VALUES (2)
INSERT INTO Foo (WorkItem) VALUES (1)
INSERT INTO Foo (WorkItem) VALUES (1)
INSERT INTO Foo (WorkItem) VALUES (2)
SELECT * FROM Foo
WHERE WorkItem > -1
Upvotes: 1