Database growth rate and info


Job details

Name: Database growth rate and info
Platform: Postgres
Category: Capacity
Description: Collects growth rate information per database.
Long description: Collects growth rate information per database.
Version: 1.61
Default schedule: 10 5,17 * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘postgres’]/.[hasengine=‘YES’]

Parameters

Name Default value Description
keep data for 365 The number of days to keep the data for.
ignore database template0,template1 Databases you do not want to list in report.

Job Summary

select datname as "Database name", round(pg_database_size(datname)/1024.0/1024.0,1) as "Database size in MB" from pg_database where datname not in (select ignore_db from dbw_database_growth_ignore_list);

and

select datname as "Database name", sum(size_change/1024.0/1024.0) as "Data change", date_trunc('day', histr_date) as "History date" from dbw_database_growth_histr where period > 0 and extract(epoch from histr_date) > extract(epoch from (current_time - interval '1 month')) and datname not in (select ignore_db from dbw_database_growth_ignore_list) group by datname, date_trunc('day', histr_date);

Job Configurations

Data Retention and Exclusions

Dependencies

Reporting

Each presentation in the report focuses on providing a visual and tabular understanding of database sizes and changes, vital for assessing trends and making informed decisions regarding database management.