11 Jan 2007 13:15
Re: [PERFORM] table partioning performance
Simon Riggs <simon <at> 2ndquadrant.com>
2007-01-11 12:15:50 GMT
2007-01-11 12:15:50 GMT
On Wed, 2007-01-10 at 16:00 -0500, Steven Flatt wrote: > On 1/9/07, Simon Riggs <simon <at> 2ndquadrant.com> wrote: > If you are doing date range partitioning it should be fairly > simple to > load data into the latest table directly. That was the way I > originally > intended for it to be used. The rules approach isn't something > I'd > recommend as a bulk loading option and its a lot more complex > anyway. > The problem we have with blindly loading all data into the latest > table is that some data (< 5%, possibly even much less) is actually > delivered "late" and belongs in earlier partitions. So we still > needed the ability to send data to an arbitrary partition. Yes, understand the problem. COPY is always going to be faster than INSERTs anyhow and COPY doesn't allow views, nor utilise rules. You can set up a client-side program to pre-qualify the data and feed it to multiple simultaneous COPY commands, as the best current way to handle this. -- Next section aimed at pgsql-hackers, relates directly to above: My longer term solution looks like this: 1. load all data into newly created partition (optimised in a newly submitted patch for 8.3), then add the table as a new partition(Continue reading)
. At least that'd be the case if the stats collector
output were fully populated. Did you have either stats_block_level or
stats_row_level turned on in 8.1? If not, maybe the reason for the
change is that in 8.2, that table *will* be pretty fully populated,
because now it's got a last-vacuum-time entry that gets made even if the
stats are otherwise turned off. Perhaps making that non-disablable
wasn't such a hot idea
RSS Feed