pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
Date: Thu, 17 Jun 2004 09:13:43 +0530
Message-ID: <40D1136F.3040708@trade-india.com> (raw)
In-Reply-To: <23874.1087409853@sss.pgh.pa.us>
References: <40CFFC68.5090704@trade-india.com>
	<21524.1087394109@sss.pgh.pa.us>
	<40D06096.90200@trade-india.com>
	<22477.1087400110@sss.pgh.pa.us>
	<40D06D1E.5000803@trade-india.com>
	<23874.1087409853@sss.pgh.pa.us>

Tom Lane wrote:




>Rajesh Kumar Mallah <mallah@trade-india.com> writes:
>  
>
>>It does.
>>    
>>
>
>And?
>
>  
>
Yep the problem of original posting could be replicated on
disabling hash aggregates. On disabling i could get the repeated rows.


Regds
Mallah.


rt2=# SET enable_hashagg TO off;
SET
Time: 329.533 ms
rt2=# explain analyze SELECT name from users_sample group by name having 
count(*) > 1 ;
+------------------------------------------------------------------------------------------------------------------------------+
|                                                          QUERY 
PLAN                                                          |
+------------------------------------------------------------------------------------------------------------------------------+
| GroupAggregate  (cost=69.83..78.33 rows=200 width=78) (actual 
time=2411.411..2749.733 rows=4 loops=1)                        |
|   Filter: (count(*) > 
1)                                                                                                     
|
|   ->  Sort  (cost=69.83..72.33 rows=1000 width=78) (actual 
time=2411.300..2532.821 rows=100489 loops=1)                      |
|         Sort Key: 
name                                                                                                       
|
|         ->  Seq Scan on users_sample  (cost=0.00..20.00 rows=1000 
width=78) (actual time=0.024..170.258 rows=100489 loops=1) |
| Total runtime: 2915.439 
ms                                                                                                   
|
+------------------------------------------------------------------------------------------------------------------------------+
(6 rows)

Time: 3265.102 ms
rt2=# SELECT name from users_sample group by name having count(*) > 1 ;
+----------------------+
|         name         |
+----------------------+
| ???           |
| ????163.com     |
| ?@hotmail.com |
| p?                |
+----------------------+
(4 rows)

Time: 3358.030 ms
rt2=# SET enable_hashagg TO on;
SET
Time: 330.148 ms
rt2=# SELECT name from users_sample group by name having count(*) > 1 ;
+------+
| name |
+------+
+------+
(0 rows)

Time: 752.395 ms
rt2=#







>>Tom Lane wrote:
>>    
>>
>>>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
>
>  
>

view thread (9+ messages)  latest in thread

Message-ID: <40D1136F.3040708@trade-india.com>
Permalink:  ../40D1136F.3040708@trade-india.com/
Also on:    postgresql.org/message-id/40D1136F.3040708@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mallah@trade-india.com, tgl@sss.pgh.pa.us
  Subject: Re: weired behavior... after pg_resetxlog-> dump->initdb-->reload.
  In-Reply-To: <40D1136F.3040708@trade-india.com>
  References: <40CFFC68.5090704@trade-india.com> <21524.1087394109@sss.pgh.pa.us> <40D06096.90200@trade-india.com> <22477.1087400110@sss.pgh.pa.us> <40D06D1E.5000803@trade-india.com> <23874.1087409853@sss.pgh.pa.us> <40D1136F.3040708@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox