LARGEST tables from the DB

Here’s a quick way to find out the top 20% largest table from your database.

SELECT TOP (20) PERCENT * FROM #LargestTable ORDER BY TotalSpaceKB DESC
DROP TABLE #LargestTable

Lasă un răspuns