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

萧鸿骏 <23031212454@stu.xidian.edu.cn>

From: 萧鸿骏 <23031212454@stu.xidian.edu.cn>
To: "Laurenz Albe" <laurenz.albe@cybertec.at>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-05-20T03:28:36Z
Lists: pgsql-bugs

2025-05-19 23:23:58 "Laurenz Albe" <laurenz.albe@cybertec.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