Re: BIGINT indexes still with problems - Mailing list pgsql-general

From Stephan Szabo
Subject Re: BIGINT indexes still with problems
Date
Msg-id 20040810122707.M83467@megazone.bigpanda.com
Whole thread Raw
In response to BIGINT indexes still with problems  ("Dan Ruthers" <dan211a@lycos.com>)
List pgsql-general
On Mon, 9 Aug 2004, Dan Ruthers wrote:

> Now, if I run this query (note the int8 cast - also tried with the '' cast to String, same results):
> test=> explain select * from dmaildatum where idparent=int8(783219);
>                             QUERY PLAN
> ------------------------------------------------------------------
>  Seq Scan on dmaildatum  (cost=0.00..2241.71 rows=2229 width=272)
>    Filter: (idparent = 783219::bigint)
> (2 rows)
>
> The index is not used. But with an identical query, only different parameter value:
> desknow=> explain select * from dmaildatum where idparent=int8(1187838);
>                                           QUERY PLAN
>
> --------------------------------------------------------------------------------
> ---------------
>  Index Scan using ix_dmaildatum_idparent on dmaildatum  (cost=0.00..284.05 rows=
> 102 width=272)
>    Index Cond: (idparent = 1187838::bigint)
> (2 rows)


Look at the row estimates for the two cases.  How many rows are actually
returned and how long the queries take (explain analyze will give that
information)?


pgsql-general by date:

Previous
From: Robert L Mathews
Date:
Subject: Re: PostgreSQL 8.0 Feature List?
Next
From: Sven Willenberger
Date:
Subject: pg_restore with Fc fails with [archiver] out of memory error