Skip to main content

Commands and models for tracking internal postgres stats.

Project description

django-pgstats

django-pgstats provides commands and models for tracking internal postgres stats. Specifically, the IndexStats model stores stats about postgres indices and the TableStats model stores stats about postgres tables.

Postgres stat tables contain global statistical information. django-pgstats is meant to be executed periodically so that one can later analyze table and index usage. This is done by periodically calling python manage.py snapshot_pgstats using a task runner such as Celery.

Stats are stored as JSON fields in the respective IndexStats and TableStats models. Each key in the JSON field is in the format of {schema}.{table} for table stats or {schema}.{table}.{index} for index stats.

Compatibility

django-pgstats is compatible with Python 3.9 - 3.13, Django 4.2 - 5.1, Psycopg 2 - 3, and Postgres 13 - 17.

Documentation

View the django-pgstats docs here

Installation

Install django-pgstats with:

pip3 install django-pgstats

After this, add pgstats to the INSTALLED_APPS setting of your Django project.

Contributing Guide

For information on setting up django-pgstats for development and contributing changes, view CONTRIBUTING.md.

Creators

  • @wesleykendall (Wes Kendall)
  • @tomage (Tómas Árni Jónasson)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_pgstats-1.5.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

django_pgstats-1.5.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file django_pgstats-1.5.1.tar.gz.

File metadata

  • Download URL: django_pgstats-1.5.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-1020-aws

File hashes

Hashes for django_pgstats-1.5.1.tar.gz
Algorithm Hash digest
SHA256 60d1bb57120587875446d09fd5d0e95fd12bad6a5be60e3e4ff70362f16163b6
MD5 dc7c9dee7204deb6448f59849b1284be
BLAKE2b-256 dd1678c4eab52395175f5264f3a9aece6e93fba145468f95e6ad7c3316fd57f0

See more details on using hashes here.

File details

Details for the file django_pgstats-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: django_pgstats-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-1020-aws

File hashes

Hashes for django_pgstats-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3105f8202ee9146a5178ddda32149cd0f22ab052831a1d69bf6156f795e3f54d
MD5 357aa4a7dd2fe8dfa4df58ad23ab85c1
BLAKE2b-256 1f3c8442d7f2f8917454fa61f28f610392a5a263b333a3867fdb5891d4d83bc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page