Re: bigint indices with inequalities? - Mailing list pgsql-general

From Ed L.
Subject Re: bigint indices with inequalities?
Date
Msg-id 200303181900.45537.pgsql@bluepolka.net
Whole thread Raw
In response to Re: bigint indices with inequalities?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
On Tuesday March 18 2003 6:16, Stephan Szabo wrote:
> On Tue, 18 Mar 2003, Ed L. wrote:
> > Can anyone help me understand why this query is not using an index?
> > Schema, query, and explain output for 3 different attempts are below.
> >
...
> >                ->  Seq Scan on _dbm_pending_data pd  (cost=0.00..886.74
...
> >                            ->  Seq Scan on _dbm_pending p
> > (cost=0.00..832.93 rows=35876 width=46)
> >                                  Filter: (xid > 268010::bigint)
>
> It's estimating that the xid condition is not very selective (35876 of
> 36474).  If that's true an index scan is likely to be a loser against the
> sequence scan.

That makes perfect sense.  Turns out the literal was very near the minimum
value.  Thanks.

Ed



pgsql-general by date:

Previous
From: Kurt Overberg
Date:
Subject: Re: Big insert/delete memory problems
Next
From: James Gregory
Date:
Subject: Re: Referential Integrity problem