Search Postgresql Archives

Faster way of estimating database size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

At the moment we are using:

SELECT pg_database.datname, pg_database_size(pg_database.datname) as
size FROM pg_database

To gather size of databases for monitoring purposes in Prometheus.

Our pg stat logging now shows this is our number one query cause we
seem to be running it for some crazy reason 19 times a minute. Clearly
this is too much and we should (and will) cache results for a bit.

Nonetheless, I notice it take 400ms to run on our cluster (with a few
200 dbs) and was wondering if there is a quicker way of estimating
this number?

Sam




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux