Created
October 12, 2012 07:57
-
-
Save smd877/3877864 to your computer and use it in GitHub Desktop.
PostgreSQLでDBの各テーブルのレコード数を確認したいとき
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 T2.relname | |
, T2.reltuples | |
FROM pg_stat_user_tables AS T1 | |
INNER JOIN pg_class AS T2 | |
ON T1.relname = T2.relname | |
ORDER BY T2.relname; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment