Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4 - Mailing list pgsql-general

From Sergey Konoplev
Subject Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4
Date
Msg-id c3a7de1f0810200617w9f2057du9154626f08f87dd5@mail.gmail.com
Whole thread Raw
In response to index scan leads to result that is different from sec scan after upgrading to 8.3.4  ("Sergey Konoplev" <gray.ru@gmail.com>)
Responses Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4
Next
From: Tom Lane
Date:
Subject: Re: index scan leads to result that is different from sec scan after upgrading to 8.3.4