janbjorge / PgQueuer

PgQueuer is a Python library leveraging PostgreSQL for efficient job queuing.
https://pgqueuer.readthedocs.io/en/latest/index.html
MIT License
211 stars 2 forks source link

BREAKING: Rework log/statistics table #5

Closed janbjorge closed 2 months ago

janbjorge commented 2 months ago

This PR introduces a new statistical logging table and a dashboard feature to improve the management of high-volume and bursty data scenarios in PgQueuer. These changes aim to address scalability issues and enhance data analysis capabilities.

Enhancements:

  1. Statistical Logging Table:

    • Replaces the previous log table with pgqueuer_statistics, designed to handle large volumes efficiently by minimizing write and read latencies.
    • Implements a unique index and a streamlined schema that reduces the reliance on extensive GROUP BY operations, enabling faster data aggregation and retrieval.
  2. Dashboard Feature:

    • Adds a dashboard command to the CLI, using the tabulate library for real-time visual display of log statistics. This feature facilitates immediate insights into system performance and job processing metrics, useful during data bursts.

Motivation:

The redesign of the logging system focuses on performance improvement for environments experiencing high transaction rates and data bursts, ensuring that PgQueuer remains robust and responsive under varying load conditions.

This update significantly bolsters PgQueuer’s logging capabilities, making it better suited for larger deployments and complex operational environments.