Re: Strange Index behavior - Mailing list pgsql-general

From Tom Lane
Subject Re: Strange Index behavior
Date
Msg-id 4674.1103734014@sss.pgh.pa.us
Whole thread Raw
In response to Strange Index behavior  (Együd Csaba <csegyud@vnet.hu>)
Responses Re: Strange Index behavior
List pgsql-general
=?iso-8859-2?Q?Egy=FCd_Csaba?= <csegyud@vnet.hu> writes:
> # explain analyze select meterid, tstamp, pp, pm, status from measured_1
> where tstamp >= '2004.12.22 00:00' and tstamp <= '2004.12.22 23:59' order by
> tstamp, meterid;
> "Sort  (cost=2619.02..2622.78 rows=1505 width=42) (actual
> time=1672.000..1682.000 rows=14523 loops=1)"
> "  Sort Key: tstamp, meterid"
> "  ->  Seq Scan on measured_1  (cost=0.00..2539.59 rows=1505 width=42)
> (actual time=0.000..1292.000 rows=14523 loops=1)"
> "        Filter: ((tstamp >= '2004-12-22 00:00:00'::timestamp without time
> zone) AND (tstamp <= '2004-12-22 23:59:00'::timestamp without time zone))"
> "Total runtime: 1802.000 ms"

Why do you say there are no such rows, when the explain output clearly
shows there are 14523 of them?  The plan shift looks fairly reasonable
to me given the large number of rows to be retrieved.

            regards, tom lane

pgsql-general by date:

Previous
From: "A. Mous"
Date:
Subject: Re: 8.0 Beta3 worked, RC1 didn't!
Next
From: Tom Lane
Date:
Subject: Re: AREs in substring(from)