|
Seeder question: I have a table whose clustered index is created on a partition scheme - how do I determine what file group each partition is stored in using a query? It needs to be a query rather than referencing the DDL because the information is needed for a space report.
(comments are locked)
|
|
This turned out to be tougher than I thought it would. I had to do some serious BOL research to figure out the connection (sys.allocation_units). I decided to include the approximate number of rows from sys.partitions as some extra information. Yeah, it's not as easy as you might think! You can also go from sys.indexes -> sys.partition_schemes -> sys.destination_data_spaces -> sys.filegroups but that method is even less obvious! :)
Oct 28 '09 at 07:43 AM
Matt Whitfield ♦♦
(comments are locked)
|

