Re: Re: BUG #18935: The optimiser's choice of sort doubles the execution time.

From: 萧鸿骏 <23031212454(at)stu(dot)xidian(dot)edu(dot)cn>
To: "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Re: BUG #18935: The optimiser's choice of sort doubles the execution time.
Date: 2025-05-20 03:28:36
Message-ID: 2e178b46.15a.196ebbc6b43.Coremail.23031212454@stu.xidian.edu.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

2025-05-19 23:23:58 "Laurenz Albe" <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> I see no bug here.
> The join condition is so complicated that the planner has a hard
> time estimating the number of result rows for the join.
> It guesses way to low, so the sort is expensive, and avoiding it is cheaper.
>
> The optimizer cannot be perfect, particularly in the face of complicated
> expressions like that.
>
> Yours,
> Laurenz Albe

Thank you for your answer! In the future I will avoid performance issues due to under-optimization of the optimizer.

regards,
hongjun xiao

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-05-20 04:31:26 Re: BUG #18929: After the view is created, executed query against the view definition, reported syntax error.
Previous Message Nathan Bossart 2025-05-19 20:30:29 Re: BUG #18923: pg_dump 18beta1 fails to process complex table names