Re: Performance on Bulk Insert to Partitioned Table

Поиск
Список
Период
Сортировка
От Vitalii Tymchyshyn
Тема Re: Performance on Bulk Insert to Partitioned Table
Дата
Msg-id CABWW-d3a=OFrh5fxR3ZzoKEwsxZ1UUYQqXCF9FXo_vp2j9bDDQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance on Bulk Insert to Partitioned Table  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-performance
It's a pity. Why does not it listed in "Compatibility" section of create trigger documentation? I think, this makes "for each statement" triggers not compatible with SQL99.


2012/12/28 Pavel Stehule <pavel.stehule@gmail.com>
Hello

>
> Also, for bulk insert, have you tried "for each statement" triggers instead
> of "for each row"?
> This would look like a lot of inserts and would not be fast in
> single-row-insert case, but can give you benefit for huge inserts.
> It should look like
> insert into quotes_2012_09_10 select * from new where cast(new.received_time
> as date) = '2012-09-10' ;
> insert into quotes_2012_09_11 select * from new where cast(new.received_time
> as date) = '2012-09-11' ;
> ...

It has only one problem - PostgreSQL has not relations NEW and OLD for
statements triggers.

Regards

Pavel



--
Best regards,
 Vitalii Tymchyshyn

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

Предыдущее
От: Vitalii Tymchyshyn
Дата:
Сообщение: Re: Performance on Bulk Insert to Partitioned Table
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Performance on Bulk Insert to Partitioned Table