Re: Reducing memory usage of insert into select operations? - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Reducing memory usage of insert into select operations?
Date
Msg-id cone.1216354727.491297.29970.1000@zoraida.natserv.net
Whole thread Raw
In response to Reducing memory usage of insert into select operations?  (Francisco Reyes <lists@stringsutils.com>)
Responses Re: Reducing memory usage of insert into select operations?
List pgsql-general
Douglas McNaught writes:


> It does seem that reducing work_mem might help you, but others on this

I reduced it from 256MB to 64MB. It seems it is helping.
At 256MB the usage per DB connection instance was upwards of 12GB. At 64MB
so far is around 7GB. I just reduced it further to 32MB and see how that
works.


> It would probably be helpful for you to post the EXPLAIN output from
Hash Join  (cost=712213.57..27293913.33 rows=234402352 width=24)
   Hash Cond: (coh.id = ids.id)
   ->  Hash Join  (cost=551387.26..18799378.16 rows=234402352 width=22)
         Hash Cond: (coh.user_id = ca.user_id)
         ->  Seq Scan on customer_original_historical coh
              (cost=0.00..6702501.40 rows=234402352 width=47)
               Filter: (yearmo > '200703'::bpchar)
         ->  Hash  (cost=268355.67..268355.67 rows=14637567 width=32)
               ->  Seq Scan on cards ca
               (cost=0.00..268355.67 rows=14637567 width=32)
   ->  Hash  (cost=77883.25..77883.25 rows=5055525 width=6)
         ->  Seq Scan on customer_ids ids
             (cost=0.00..77883.25 rows=5055525 width=6)

pgsql-general by date:

Previous
From: "Douglas McNaught"
Date:
Subject: Re: Reducing memory usage of insert into select operations?
Next
From: Francisco Reyes
Date:
Subject: Re: Reducing memory usage of insert into select operations?