Created
November 3, 2021 09:16
-
-
Save ricardoaugusto/13b497fe6774e97259a555a218f3ce3e to your computer and use it in GitHub Desktop.
Estimate row count for all tables in a SQL DB. Source: https://stackoverflow.com/a/11778602
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TABLE_NAME,SUM(TABLE_ROWS) | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA = 'database_name' | |
GROUP BY TABLE_NAME; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment