From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> |
Subject: | Re: Optimization outcome depends on the index order |
Date: | 2023-12-25 11:36:37 |
Message-ID: | CAPpHfduuwDhxZa496O5cpF3hLbv+m-XV6Qn8=xTpDwXGQ1=3Pg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 22, 2023 at 7:24 PM Andrei Lepikhov
<a(dot)lepikhov(at)postgrespro(dot)ru> wrote:
> On 22/12/2023 11:48, Alexander Korotkov wrote:
> > > Because we must trust all predictions made by the planner, we just
> > > choose the most trustworthy path. According to the planner logic, it is
> > > a path with a smaller selectivity. We can make mistakes anyway just
> > > because of the nature of estimation.
> >
> > Even if we need to take selectivity into account here, it's still not
> > clear why this should be on top of other logic later in add_path().
> I got your point now, thanks for pointing it out. In the next version of
> the patch selectivity is used as a criteria only in the case of COSTS_EQUAL.
It looks better now. But it's hard for me to judge these heuristics
in add_path(). Tom, what do you think about this?
------
Regards,
Alexander Korotkov
From | Date | Subject | |
---|---|---|---|
Next Message | Ayush Vatsa | 2023-12-25 11:40:40 | Re: Proposal to include --exclude-extension Flag in pg_dump |
Previous Message | Richard Guo | 2023-12-25 11:21:42 | Re: Avoid computing ORDER BY junk columns unnecessarily |