I did somes partitions on my sql database with the wizard of microsoft Sql Server Management Studio. But i wanted to know if it's possible to do an request for show just lines contains by one partition.
I tried this :
select * from MyTable where $PARTITION.LinkTest(ID) = 2;
But it's just show me the result of the partition function LinkTest not the lines contained on one filegroups or file. Someone know how I can do that?
Best Answer
This is a pretty basic query I use to get rows ( lines? ) per object on my partitioned schemes:
You could add the name of your table and the partition you're interested in to the predicate:
For a little more detailed information ( per index, compression stats, etc ), I use this little guy: