Re: About partitioning

Поиск
Список
Период
Сортировка
От Adrian von Bidder
Тема Re: About partitioning
Дата
Msg-id 201001201154.27510@fortytwo.ch
обсуждение исходный текст
Ответ на About partitioning  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Ответы Re: About partitioning  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Список pgsql-general
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


--
Udall's Fourth Law:
    Any change or reform you make is going to have consequences you
    don't like.

В списке pgsql-general по дате отправления:

Предыдущее
От: tmp
Дата:
Сообщение: Re: Size of row-metadata?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Size of row-metadata?