Re: BETWEEN optimizer problems with single-value

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-performance(at)postgresql(dot)org, Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Subject: Re: BETWEEN optimizer problems with single-value
Date: 2006-03-16 00:07:06
Message-ID: 1142467626.3859.207.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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()...

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-03-16 00:24:38 Re: BETWEEN optimizer problems with single-value
Previous Message Kevin Grittner 2006-03-15 23:34:33 Re: [HACKERS] BETWEEN optimizer problems with single-value

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2006-03-16 00:24:38 Re: BETWEEN optimizer problems with single-value
Previous Message Kevin Grittner 2006-03-15 23:34:33 Re: [HACKERS] BETWEEN optimizer problems with single-value