Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strvmarv/6f35d8679705f00c2aa3167c0f6661e7 to your computer and use it in GitHub Desktop.
Save strvmarv/6f35d8679705f00c2aa3167c0f6661e7 to your computer and use it in GitHub Desktop.
SELECT o.name objectname,i.name indexname, partition_id, partition_number, [rows]
FROM sys.partitions p
INNER JOIN sys.objects o ON o.object_id=p.object_id
INNER JOIN sys.indexes i ON i.object_id=p.object_id and p.index_id=i.index_id
WHERE
o.name LIKE '%Imagination%'
AND [rows] > 0
ORDER BY o.name, i.name DESC, partition_number DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment