Re: BUG #19357: PostgreSQL generates a custom plan that performs worse than the generic plan for a certain query.
| От | ZhangChi |
|---|---|
| Тема | Re: BUG #19357: PostgreSQL generates a custom plan that performs worse than the generic plan for a certain query. |
| Дата | |
| Msg-id | tencent_2A825DEBCCCF93399A24C409873A2FE5EF0A@qq.com обсуждение исходный текст |
| Ответ на | Re: BUG #19357: PostgreSQL generates a custom plan that performs worse than the generic plan for a certain query. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
Hi Tom Lane,
I strongly agree with your point. My objective is not to make PostgreSQL capable of optimizing all queries. My intention is simply to note that, for this test case, PostgreSQL is fully capable of optimizing the query, as demonstrated by the generic plan. However, I am unsure why the performance of the custom plan actually degrades. I believe that understanding the reasons behind this performance degradation (or suboptimality) could be important. This facilitates PostgreSQL’s selection of the optimal query plan.
Best,
Chi
Original
From: Tom Lane <tgl@sss.pgh.pa.us> Date: 2025-12-17 23:39 To: Greg Sabino Mullane <htamfids@gmail.com> Cc: 798604270 <798604270@qq.com>, pgsql-bugs <pgsql-bugs@lists.postgresql.org> Subject: Re: BUG #19357: PostgreSQL generates a custom plan that performs worse than the generic plan for a certain query. |
> Please simplify your test query as much as possible and use "text" format
> in your explain results; those will improve your chances of getting a
> useful reply. :)
More to the point: it's hard to get excited about optimizing a query
that was so obviously built by a fuzzer rather than corresponding to
any real-world use-case. We have finite manpower and we'd much rather
put it into solving users' real problems.
regards, tom lane
В списке pgsql-bugs по дате отправления: