Re: Fw: Performance UPDATE/INSERT

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Fw: Performance UPDATE/INSERT
Дата
Msg-id b42b73150604110622u4c2eacd1o619df0d3c8fe288d@mail.gmail.com
обсуждение исходный текст
Ответ на Fw: Performance UPDATE/INSERT  ("MG" <pgsql-general@carladata.de>)
Список pgsql-general
On 4/11/06, MG <pgsql-general@carladata.de> wrote:
> In on extreme case the application  makes 100 000  INSERTs, in the other
> extreme case 100 000 UPDATES. Normally the UPDATES are more that INSERTs.
> Here I notice that the first case (100 000  INSERTs)  takes about 30 minues,
> but the 100 000 UPDATES about 1 hour.
>
>  I can't  prepare the file to  use an COPY, because the application
>  manipulates the records from the file in a complex way.
>  I've also tried with vaccum to get more performance, but hat no success.

You should probably look at rewriting your procedure in a pl/pgsql
function.  Have your app bulk load into a work table and then loop it
doing your sql processing on the fly. It will be fast and is a a good
exercise.

Merlin

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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Debian package for freeradius_postgresql module
Следующее
От: "John D. Burger"
Дата:
Сообщение: Re: Search by distance