Re: a wrong index choose when statistics is out of date

From: Andy Fan <zhihuifan1213(at)163(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: a wrong index choose when statistics is out of date
Date: 2024-03-08 09:45:54
Message-ID: 87edcl9hlu.fsf@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


David Rowley <dgrowleyml(at)gmail(dot)com> writes:

> On Thu, 7 Mar 2024 at 23:40, Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
>>
>> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
>> > If you don't want the planner to use the statistics for the column why
>> > not just do the following?
>>
>> Acutally I didn't want the planner to ignore the statistics totally, I
>> want the planner to treat the "Const" which probably miss optimizer part
>> average, which is just like what we did for generic plan for the blow
>> query.
>
> I'm with Andrei on this one and agree with his "And it is just luck
> that you've got the right answer".

Any example to support this conclusion? and what's the new problem after
this?

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-03-08 09:58:57 Re: Support a wildcard in backtrace_functions
Previous Message Hayato Kuroda (Fujitsu) 2024-03-08 09:44:19 RE: speed up a logical replica setup