pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Fan <zhihuifan1213@163.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: a wrong index choose when statistics is out of date
Date: Fri, 08 Mar 2024 17:45:54 +0800
Message-ID: <87edcl9hlu.fsf@163.com> (raw)
In-Reply-To: <CAApHDvrhKaeFzw7KczR13s=3OOb7SSjLHM7-cBpp492=0P9RSA@mail.gmail.com>
References: <878r2zeqsp.fsf@163.com>
	<CAApHDvq9QWL6az9veW1-HaW4LwGenW0V8YyKXFLZYoaF_4AQ+Q@mail.gmail.com>
	<87r0gqcjno.fsf@163.com>
	<CAApHDvr6Dv-oHN3qn3t9Z3QHLT0qi80fa_tRNmmjG8r9BhzoHA@mail.gmail.com>
	<87le6xb5j9.fsf@163.com>
	<87bk7sbzaj.fsf@163.com>
	<CAApHDvo5S5xqWQR1HKzx=5UpBr1ZKhwEtxEkt=3q0z4oR+TnPA@mail.gmail.com>
	<87msra9vgo.fsf@163.com>
	<CAApHDvrhKaeFzw7KczR13s=3OOb7SSjLHM7-cBpp492=0P9RSA@mail.gmail.com>


David Rowley <dgrowleyml@gmail.com> writes:

> On Thu, 7 Mar 2024 at 23:40, Andy Fan <zhihuifan1213@163.com> wrote:
>>
>> David Rowley <dgrowleyml@gmail.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






view thread (24+ messages)  latest in thread

Message-ID: <87edcl9hlu.fsf@163.com>
Permalink:  ../87edcl9hlu.fsf@163.com/
Also on:    postgresql.org/message-id/87edcl9hlu.fsf@163.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: zhihuifan1213@163.com, dgrowleyml@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: a wrong index choose when statistics is out of date
  In-Reply-To: <87edcl9hlu.fsf@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox