Re: Reducing memory usage of insert into select operations? [Solved]

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: Francisco Reyes <lists(at)stringsutils(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, alvherre(at)commandprompt(dot)com, dev(at)archonet(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Reducing memory usage of insert into select operations? [Solved]
Date: 2008-07-19 13:12:00
Message-ID: 4881E820.90603@stringsutils.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout wrote:
> Can you make them not deferred?
How?

I found the issue.
I had the foreign key in the master table instead of the children.
Deleted RI from master table and put into the inherited partitions.
My whole 230 million rows merged in about an hour!
And I even had two of those running at the same time. (one setup with 14
partitions per month and another with 5 partitions per month to test
difference in performance).

It was so fast I even had to do a count(*) to make sure both actually
merged.
That is 117K rows per second for rows that were about 33 bytes long.
That only comes down to about 3 MB/sec+overhead, but still 117K rows/sec
is not too shabby.

In case it is of interest to anyone..
2 AMD dual core, 2GHz CPUs
12GB of RAM
shared_buffers 3GB
work_mem 64MB
256 check_point segments
10 min checkpoing_timeout
LSI controller with 128MB cache with BBU. Write cache enabled.

Many thanks to all that offered suggestions in the troubleshooting.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2008-07-19 13:52:48 Re: Initdb problem on debian mips cobalt: Bus error
Previous Message Martijn van Oosterhout 2008-07-19 11:22:01 Re: Reducing memory usage of insert into select operations?