一覧へ戻る
lob/pg_insights(新しいタブで開きます)
主要言語: TSQL
A collection of convenient SQL for monitoring Postgres database health.
- star 数
- 310
- watcher 数
- 5
- fork 数
- 19
- issue 数
- 0
- 最終更新
- 2019/12/11
主要言語: TSQL
A collection of convenient SQL for monitoring Postgres database health.
Convenient SQL for monitoring Postgres database health. This repository is inspired by commands from Heroku's pg_extras repository.
You can run a script using psql's -f option. For example:
$ psql postgres -f sql/cache_hit_rate.sql
It also works with aliases you have setup with psql:
$ alias psql_my_db="psql -h my_db.com -d my_db -U admin" $ psql_my_db -f sql/cache_hit_rate.sql
You can also copy/paste any of the SQL in the sql/ directory and run
with the Postgres client of your choice.
active_autovacuums.sql (admin permission)analyze_stats.sql (read permission)bloat.sql (read permission)buffer_cache_usage.sql (admin permission)cache_hit_rate.sql (read permission)index_hit_rate.sql (read permission)index_size.sql (read permission)reset_stats.sql (admin permission)table_settings.sql (read permission)table_size.sql (read permission)table_size_with_indices.sql (read permission)toast_size.sql (read permission)unused_indices.sql (read permission)vacuum_stats.sql (read permission)Pull requests for bug fixes, improvements, or new SQL are always welcome!