Re: Performance on Bulk Insert to Partitioned Table - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Performance on Bulk Insert to Partitioned Table
Date
Msg-id CAOR=d=3_R5DFrN1r06M986L7patsGWMJ-u+xwkaTm6bnhH6CoA@mail.gmail.com
Whole thread Raw
In response to Performance on Bulk Insert to Partitioned Table  (Charles Gomes <charlesrg@outlook.com>)
Responses Re: Performance on Bulk Insert to Partitioned Table
List pgsql-performance
On Thu, Dec 20, 2012 at 10:29 AM, Charles Gomes <charlesrg@outlook.com> wrote:
> Hello guys
>
> I’m doing 1.2 Billion inserts into a table partitioned in
> 15.
>
> When I target the MASTER table on all the inserts and let
> the trigger decide what partition to choose from it takes 4 hours.
>
> If I target the partitioned table directly during the
> insert I can get 4 times better performance. It takes 1 hour.
>
> I’m trying to get more performance while still using the
> trigger to choose the table, so partitions can be changed without changing the
> application that inserts the data.
>
> What I noticed that iostat is not showing an I/O bottle
> neck.

SNIP

> I also don’t see a CPU bottleneck or context switching
> bottle neck.

Are you sure? How are you measuring CPU usage?  If you've got > 1
core, you might need to look at individual cores in which case you
should see a single core maxed out.

Without writing your trigger in C you're not likely to do much better
than you're doing now.


pgsql-performance by date:

Previous
From: Charles Gomes
Date:
Subject: Performance on Bulk Insert to Partitioned Table
Next
From: Charles Gomes
Date:
Subject: Re: Performance on Bulk Insert to Partitioned Table