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