Re: About partitioning

From: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
To: Adrian von Bidder <avbidder(at)fortytwo(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About partitioning
Date: 2010-01-20 10:57:37
Message-ID: 3eff28921001200257x14cffce7v5e2dc121713eca64@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/1/20 Adrian von Bidder <avbidder(at)fortytwo(dot)ch>:
> Hi,
>
> [ creating db partitions on demand ]
>
> On Wednesday 20 January 2010 11.20:21 Vincenzo Romano wrote:
>> In case 1 I need to inspect the catalog with at least a select, while
>> in case 2 I need to trap errors.
>> In my (little) experience trapping errors is slow, so I would go for
>>  option 1.
>
> Trapping/handling the error might be slow, but remember that creating a new
> partition (presumably) doesn't happen often (and creating the partition is
> slow anyway.)  In case 1 (check if the partition exists before insert),
> *every* *single* *insert* is slower because you first query the catalog,
> while in case 2, the normal case (insert into existing partition) is fast
> and only the rare case (how is your partitioning?  1000000 or more rows per
> partition on average?  I'd think it's quite a lot because why else partition
> the data at all...?) is slow.
>
> cheers
> -- vbi

Hmmm ... also trapping would happen for every single line being inserted ...

--
Vincenzo Romano
NotOrAnd Information Technologies
NON QVIETIS MARIBVS NAVTA PERITVS

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-01-20 11:01:03 Re: About partitioning
Previous Message Thomas Kellerer 2010-01-20 10:57:00 Re: Size of row-metadata?