Search Postgresql Archives

Re: Reducing memory usage of insert into select operations?

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

 



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)


[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