Re: [GENERAL] So slow inserts... Why?

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [GENERAL] So slow inserts... Why?
Дата
Msg-id 374CED24.69E7DA9A@krs.ru
обсуждение исходный текст
Ответ на Re: [GENERAL] So slow inserts... Why?  (Remigiusz Sokolowski <rems@gdansk.sprint.pl>)
Список pgsql-general
Remigiusz Sokolowski wrote:
>
> > Try using transactions.  I found when doing single inserts they could take
> > hours, but when grouping all the inserts into a single transaction, it was
> > relatively quick.  It's been a while, but I believe the syntax is:
> > BEGIN
> > insert ...
> > insert ...
> > insert ...
> > COMMIT;
>
> Btw. I want to ask about how much "inserts" can I insert between BEGIN and

2^32 - 2  -:)

> END; When I do it last time ( I want to add about 1000 "inserts") - I get
> error - that buffer can contain to 20 000 characters.
> I use psql, so I'm not sure if this is a limit of psql itself or limit of
> backend.
> And may be anybody knows if it is possible change this limit and where?

You have to add ; after each insert...

Vadim

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

Предыдущее
От: Michal Samek
Дата:
Сообщение: Re: [GENERAL] So slow inserts... Why?
Следующее
От: Sebestyen Zoltan
Дата:
Сообщение: 6.4.2 on DEC Alpha