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

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Query planner instability on large append-only table with heavy same-day inserts
Дата
Msg-id 48cacb3c6e564e83ff67d7925d75488b79d74dba.camel@cybertec.at
обсуждение исходный текст
Ответ на Query planner instability on large append-only table with heavy same-day inserts  (Giriraj Sharma <giriraj.sharma27@gmail.com>)
Список pgsql-general
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
werun ANALYZE. 

The best approach is to run autoanalyze often enough, either by reducing
autovacuum_analyze_scale_factor for the table or (as you suggested) by
setting the parameter to 0 and using only autovacuum_analyze_threshold.

There is no way to force a certain plan in PostgreSQL, unless you are
using the pg_hint_plan extension.

Yours,
Laurenz Albe



В списке pgsql-general по дате отправления: