Search Postgresql Archives

Out of memory error on select

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a fairly large table (21M) records. One field of type varchar(16)
has some duplicate values, which I'm trying to identify.
Executing select dup_field from dup_table group by dup_field having
count(*) > 1 errs with Out of Memory error. Server has 4GB memory, the
backend-process errs after 3.7GB consumed. Is there any work-around that
I may use to get this duplicates?

Explain output:
"HashAggregate  (cost=881509.02..881510.02 rows=200 width=20)"
"  Filter: (count(*) > 1)"
"  ->  Seq Scan on lssi_base  (cost=0.00..872950.68 rows=1711668
width=20)"

Why is the hash eating so much memory? A fast calc of the memory
occupied by this data is less than 512MB.


TIA,


-- 
Werner Bohl <WernerBohl@xxxxxxxxxxx>
IDS de Costa Rica S.A.


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux