Re: pg_stat_advisor extension

Поиск
Список
Период
Сортировка
От Ilia Evdokimov
Тема Re: pg_stat_advisor extension
Дата
Msg-id aa034271-821c-42f3-92a1-b4112111c9c2@tantorlabs.com
обсуждение исходный текст
Ответ на Re: pg_stat_advisor extension  (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>)
Список pgsql-hackers

>1. In the case of parallel workers the plan_rows value has a different semantics than the number of rows predicted. Just explore get_parallel_divisor().

>2. The extension recommends new statistics immediately upon an error finding. But what if the reason for the error is stale statistics? Or this error may be raised for only one specific set of constants, and estimation will be done well in another 99.9999% of cases for the same expression.

The new parameter, `pg_stat_advisor.analyze_scale_factor`, can suggest the execution of the ANALYZE command on specific tables. The extension now evaluates the ratio of `n_live_tup` (number of live tuples) to `n_mod_since_analyze` (number of modifications since last analyze) in the `pg_stat_all_tables` catalog. If this ratio exceeds the value specified in `analyze_scale_factor`, the extension will suggest an update to the table's statistics.

There are a lot of parameters that influences on estimated rows. Statistics might not help improve estimated rows. This feature is designed to provide users with data-driven insights to decide whether updating statistics via the ANALYZE command could potentially improve query performance. By suggesting rather than automatically executing statistics updates, we empower you to make informed decisions based on the specific needs and conditions of your database environment.

I've developed an extension that provides suggestions on whether to update or create statistics for your PostgreSQL database, without executing any changes. This approach allows you to consider various parameters that influence row estimates and make informed decisions about optimizing your database's performance.

Your feedback is invaluable, and we look forward to hearing about your experiences and any improvements you might suggest. Best regards, Ilia Evdokimov Tantor Labs LLC.

Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Slow catchup of 2PC (twophase) transactions on replica in LR
Следующее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Slow catchup of 2PC (twophase) transactions on replica in LR