Re: Simple query with Planner underestimating rows.
От | Andrei Lepikhov |
---|---|
Тема | Re: Simple query with Planner underestimating rows. |
Дата | |
Msg-id | 0b75eb10-5a48-4bea-a5d1-898c52dcb932@gmail.com обсуждение исходный текст |
Ответ на | Re: Simple query with Planner underestimating rows. (Andrei Lepikhov <lepihov@gmail.com>) |
Список | pgsql-performance |
On 1/29/25 15:32, Felipe López Montes wrote: > Hi, > > Thank you for your reply, > > I have already tried creating such statistics on t3.programme_identifier > and t3.participant_identifier and the plan is the same, however I cannot > create them for the right part of the join as they are from different > tables (t1 and t2) Of course, because for now, a join clause can't be estimated by extended statistics. It applies only to a scan filter (clause referencing only one relation). I have meant that with the development patch [1] applied, you may create two statistics on t3(participant_identifier,programme_identifier) and t2(participant_identifier,programme_identifier). These statistics would then be used to estimate the join clause and may resolve the problem. [1] using extended statistics to improve join estimates https://www.postgresql.org/message-id/flat/c8c0ff31-3a8a-7562-bbd3-78b2ec65f16c%40enterprisedb.com -- regards, Andrei Lepikhov
В списке pgsql-performance по дате отправления: