Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4

From: "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4
Date: 2008-10-20 13:17:21
Message-ID: c3a7de1f0810200617w9f2057du9154626f08f87dd5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry, I forget to paste explains

> explain showed that first query do index scan and second one sec scan.
>

db_online=> select obj_status_did, count(1) from person_online
where obj_status_did = 1 group by obj_status_did;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------
GroupAggregate (cost=0.00..36.37 rows=1 width=2) (actual
time=1.169..1.170 rows=1 loops=1)
-> Index Scan using i_person_online_test__geo_point on
person_online_test (cost=0.00..30.07 rows=1258 width=2) (actual
time=0.016..0.928 rows=258 loops=1)
Total runtime: 1.268 ms
(3 rows)

db_online=> select obj_status_did, count(1) from person_online
group by obj_status_did;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------
HashAggregate (cost=302.87..302.88 rows=1 width=2) (actual
time=0.668..0.669 rows=1 loops=1)
-> Seq Scan on person_online_test (cost=0.00..296.58 rows=1258
width=2) (actual time=0.009..0.372 rows=258 loops=1)
Total runtime: 0.754 ms
(3 rows)

--
Regards,
Sergey Konoplev
--
PostgreSQL articles in english & russian
http://gray-hemp.blogspot.com/search/label/postgresql/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-10-20 13:32:26 Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4
Previous Message Tom Lane 2008-10-20 13:17:06 Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4