Re: Re: BUG #18935: The optimiser's choice of sort doubles the execution time. - Mailing list pgsql-bugs

From 萧鸿骏
Subject Re: Re: BUG #18935: The optimiser's choice of sort doubles the execution time.
Date
Msg-id 2e178b46.15a.196ebbc6b43.Coremail.23031212454@stu.xidian.edu.cn
Whole thread Raw
In response to Re: BUG #18935: The optimiser's choice of sort doubles the execution time.  (Laurenz Albe <laurenz.albe@cybertec.at>)
List 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

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #18929: After the view is created, executed query against the view definition, reported syntax error.
Next
From: Tom Lane
Date:
Subject: Re: BUG #18929: After the view is created, executed query against the view definition, reported syntax error.