Re: pg_stat_advisor extension - Mailing list pgsql-hackers

From Ilia Evdokimov
Subject Re: pg_stat_advisor extension
Date
Msg-id 5952b149-afb5-4461-a983-a41f800b1927@tantorlabs.com
Whole thread Raw
In response to Re: pg_stat_advisor extension  (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>)
Responses Re: pg_stat_advisor extension
List pgsql-hackers
On Feb 08 2024 at 07:14:18, Andrei Lepikhov wrote:

> 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().
Yes, this is a very weighty and important issue. I need to think about this very carefully.
>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.
>According to No.2, it might make sense to collect and track clause
>combinations and cardinality errors found and let the DBA make decisions
>on their own.
Your proposal is very interesting. In my opinion, it is worth considering updating the extended statistics if they are truly stale. And write about this in a separate message with suggestion updating statistics.
If I succeed, then in the next patch I will add the kind of extended statistics to the message, deal with the parallel workers and update statistics if necessary.
If you have additional suggestions and thoughts, feel free to write them in this thread.


Regards,
Ilia Evdokimov,
Tantor Labs LLC.

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: speed up a logical replica setup
Next
From: Maiquel Grassi
Date:
Subject: RE: Psql meta-command conninfo+