Re: Query planner instability on large append-only table with heavy same-day inserts

2025-10-28 Thread Greg Sabino Mullane
On Tue, Oct 28, 2025 at 2:36 AM Giriraj Sharma wrote: > Would daily range partitioning by effective_date (≈ 1000 partitions for 3 > years) be the right long-term approach here? > If you are querying based on dates, yes. Does not need to be daily, could do monthly for example. A retention policy

Re: Query planner instability on large append-only table with heavy same-day inserts

2025-10-28 Thread Laurenz Albe
On Tue, 2025-10-28 at 12:06 +0530, Giriraj Sharma wrote: > We are running into query planner instability on an append-only table that > records daily commit information. > The workload is heavily skewed toward the current day’s data, and query > performance deteriorates periodically until we run

Query planner instability on large append-only table with heavy same-day inserts

2025-10-27 Thread Giriraj Sharma
Environment PostgreSQL 14 / 15 tested. RDS / Aurora Postgres in production. Primary key index (effective_date, idempotency_id). Autovacuum enabled. SQLC (Go) for query generation. Context We are running into query planner instability on an append-only table that r