Skip to main content

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.10 - 3.14, Django 4.2 - 6.0, Psycopg 2 - 3, and Postgres 14 - 18.

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)

Release files for django-pgstats 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pgstats 1.6.0
File Size Uploaded
django_pgstats-1.6.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-pgstats 1.6.0
File Interpreter ABI Platform
django_pgstats-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / django_pgstats-1.6.0.tar.gz

Download URL django_pgstats-1.6.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1c16f51b2848bdf3f33943e6750ec4a014048cb3ed3a47913ad713ccea2bee39
BLAKE2b-256 checksum
How to use checksums
4b860353ff15f8c39f2b4fdf6a515608e0f6edb236e5bf4074c52893a0e397e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

Release files / django_pgstats-1.6.0-py3-none-any.whl

Download URL django_pgstats-1.6.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4748df96669fed36f77702c553be0ba5b6ec4444d0c0bf0c5ed80c4388de242a
BLAKE2b-256 checksum
How to use checksums
ec62bf6bb5d00ff1d1d9bf6ab80ad795bf3593a81a621ace9b232099f87ecc59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.14.0 Linux/6.8.0-1040-aws

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page