Skip to content

Tchoupinax/postgres-stats

Repository files navigation

postgres-stats

Postgres stats is a dashboard to analyze your Postgres database and speed up you app

Tests

Motivation 🚀

Heroku provides an expensive query dashboard to analyse your expansive queries and speed up your app. I found this tool very useful and I decide to re-create it by myself.

This project helps me to understand more deeper the Postgres project which is my favorite database project. Moreover, I use Nest.js for the backend and continue to appropriate me this framework.

Requirements 🧑‍🔬

You need to activate stat statements on your Postgres database to use this project. The following command shows you the flag to provide.

docker run -d \
  -v postgres-stats:/var/lib/postgresql/data \
  -e POSTGRES_PASSWORD=postgres \
  -p 12000:5432 \
  postgres:12 \
  -c shared_preload_libraries='pg_stat_statements' \
  -c pg_stat_statements.max=10000 \
  -c pg_stat_statements.track=all

Once you database is ready, create the extension if it is not already done.

CREATE EXTENSION pg_stat_statements;

Screenshots 🖼

Home page

Diagnose page

Requests

  • Max connections: pg:user-connections
  • Indexes: pg:cache-hit && pg:index-usage

Sources

Built with

About

Postgres stats is a dashboard to analyze your Postgres database and speed up you app

Resources

Stars

Watchers

Forks