If you’ve previously created a partitioned table in SQL Server, and you now want to know how many rows are being stored in each partition, here are three queries you can use.
In particular, you can:
- Query the
sys.dm_db_partition_statsview - Query the
sys.partitionsview - Use the
$PARTITIONfunction in a query
Below are examples of all three.