Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload. - Mailing list pgsql-admin

From Rajesh Kumar Mallah
Subject Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
Date
Msg-id 40D06D1E.5000803@trade-india.com
Whole thread Raw
In response to Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
List pgsql-admin

Dear Tom,

It does.


rt2=# explain SELECT name from users_sample group by name having count(*) > 1 ;
+-----------------------------------------------------------------------+
|                              QUERY PLAN                               |
+-----------------------------------------------------------------------+
| HashAggregate  (cost=25.00..26.00 rows=200 width=78)                  |
|   Filter: (count(*) > 1)                                              |
|   ->  Seq Scan on users_sample  (cost=0.00..20.00 rows=1000 width=78) |
+-----------------------------------------------------------------------+
(3 rows)

Time: 375.619 ms
rt2=# explain analyze SELECT name from users_sample group by name having count(*) > 1 ;
+------------------------------------------------------------------------------------------------------------------------+
|                                                       QUERY PLAN                                                       |
+------------------------------------------------------------------------------------------------------------------------+
| HashAggregate  (cost=25.00..26.00 rows=200 width=78) (actual time=567.981..567.981 rows=0 loops=1)                     |
|   Filter: (count(*) > 1)                                                                                               |
|   ->  Seq Scan on users_sample  (cost=0.00..20.00 rows=1000 width=78) (actual time=0.046..160.706 rows=100489 loops=1) |
| Total runtime: 577.212 ms                                                                                              |
+------------------------------------------------------------------------------------------------------------------------+
(4 rows)





Tom Lane wrote:
Rajesh Kumar Mallah <mallah@trade-india.com> writes: 
here is something which was the original problem
and is replicable.   
Hm.  Does EXPLAIN show that the GROUP BY query is using hash
aggregation?  Does its behavior change if you turn off enable_hashagg?
		regards, tom lane
 

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
Next
From: Toni Guttman
Date:
Subject: SNMP Agent