Re: BETWEEN optimizer problems with single-value

From: Simon Riggs
Subject: Re: BETWEEN optimizer problems with single-value
Date: ,
Msg-id: 1142467626.3859.207.camel@localhost.localdomain
(view: Whole thread, Raw)
In response to: Re: BETWEEN optimizer problems with single-value  (Tom Lane)
Responses: Re: BETWEEN optimizer problems with single-value  (Simon Riggs)
List: pgsql-performance

Tree view

BETWEEN optimizer problems with single-value range  ("Kevin Grittner", )
 Re: BETWEEN optimizer problems with single-value range  (Andreas Kretschmer, )
  Re: BETWEEN optimizer problems with single-value  ("Kevin Grittner", )
   Re: BETWEEN optimizer problems with single-value  (Tom Lane, )
    Re: BETWEEN optimizer problems with single-value  ("Kevin Grittner", )
    Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
     Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
      Re: BETWEEN optimizer problems with single-value  (Tom Lane, )
       Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
        Re: BETWEEN optimizer problems with single-value  (Tom Lane, )
         Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
          Re: BETWEEN optimizer problems with single-value  (Alvaro Herrera, )
           Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
          Re: BETWEEN optimizer problems with single-value  (Tom Lane, )
           Re: BETWEEN optimizer problems with single-value  (Simon Riggs, )
 Re: BETWEEN optimizer problems with single-value range  ("Merlin Moncure", )
  Re: BETWEEN optimizer problems with single-value range  (Andreas Kretschmer, )
   Re: BETWEEN optimizer problems with single-value range  ("Merlin Moncure", )
 Re: [HACKERS] BETWEEN optimizer problems with single-value range  (Simon Riggs, )
  Re: [HACKERS] BETWEEN optimizer problems with single-value  ("Kevin Grittner", )

On Wed, 2006-03-15 at 14:17 -0500, Tom Lane wrote:

> It looks to me like this is a matter of bad cost estimation, ie, it's
> thinking the other index is cheaper to use.  Why that is is not clear.
> Can we see the pg_stats rows for ctofcNo and calDate?

ISTM that when the BETWEEN constants match we end up in this part of
clauselist_selectivity()...




pgsql-performance by date:

From: Tom Lane
Date:
Subject: Re: BETWEEN optimizer problems with single-value
From: "Guillaume Smet"
Date:
Subject: PostgreSQL and Xeon MP