Created
May 7, 2018 04:08
-
-
Save 3manuek/53e67f9cc926b1535e926c3b547b448c to your computer and use it in GitHub Desktop.
Revisions
-
3manuek revised this gist
May 7, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ WITH timeset AS ( select pg_database_size(datname) num, pg_size_pretty(pg_database_size(datname)) size from pg_database where datname = 'db' UNION ALL select pg_database_size(datname) num, pg_size_pretty(pg_database_size(datname)) size from pg_database, pg_sleep(10) where datname = 'db' ) SELECT num - lag(num,1) OVER (ORDER BY num) bytes_per_10_second, size FROM timeset ; -
3manuek created this gist
May 7, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ WITH timeset AS ( select pg_database_size(datname) num, pg_size_pretty(pg_database_size(datname)) size from pg_database where datname = 'dm_maintenance_test' UNION ALL select pg_database_size(datname) num, pg_size_pretty(pg_database_size(datname)) size from pg_database, pg_sleep(10) where datname = 'dm_maintenance_test' ) SELECT num - lag(num,1) OVER (ORDER BY num) bytes_per_10_second, size FROM timeset ;