Alltaki script detayli bilgi vermektedir. SELECT P.*, K.* FROM ( SELECT DISTINCT ps.Name AS PartitionScheme, pf.name AS PartitionFunction, p.partition_number, fg.name AS FileGroupName, rv.value AS PartitionFunctionValue FROM sys.indexes i JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id JOIN sys.partition_schemes ps ON ps.data_space_id = i.data_space_id JOIN sys.partition_functions pf ON pf.function_id = ps.function_id LEFT JOIN sys.partition_range_values rv ON rv.function_id = pf.function_id AND rv.boundary_id = p.partition_number JOIN sys.allocation_units au ON au.container_id = p.hobt_id JOIN sys.filegroups fg ON fg.data_space_id = au.data_space_id LEFT JOIN sys.tables N ON N.object_id = p.object_id WHERE i.object_id = object_id( 'prItemBarcode' ) ) P LEFT JOIN ( SELECT $PARTITION.[pfnc_prItemBarcode]( CreatedDate ) AS PARTITION, COUNT(*) AS [COUNT] FROM [dbo].[prItemBarcode] GROUP BY $PARTITION. [pfnc_prItemBarcode]( CreatedDate ) ) K ON P.partition_number = K.Partition İki farklı basit PARTITION sorgusu SELECT partition_number, ROWS FROM sys.partitions WHERE OBJECT_NAME( OBJECT_ID )= 'prItemBarcode';
GO
VEYA
SELECT $PARTITION.[pfnc_prItemBarcode](CreatedDate) AS PARTITION, COUNT(*) AS [COUNT] FROM [dbo].[prItemBarcode] GROUP BY $PARTITION. [pfnc_prItemBarcode](CreatedDate) ORDER BY PARTITION ;