Re: best performance for simple dml

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: best performance for simple dml
Дата
Msg-id 4E083920.1070302@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: best performance for simple dml  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-sql
On 27/06/11 15:05, Pavel Stehule wrote:

> exec('begin');
> for(i = 0; i < 1000; i++)
>   exec("insert into foo values($1), itoa(i));
> exec('commit');

You can probably also benefit from multi-valued INSERTs, though I
haven't verified this.

INSERT INTO foo VALUES
(1,'joe','dean'),
(4,'fred','bob'),
(11,'anne','smith');

There'll be a threshhold above which the COPY protocol becomes faster,
though.

--
Craig Ringer


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

Предыдущее
От: chester c young
Дата:
Сообщение: Re: best performance for simple dml
Следующее
От: chester c young
Дата:
Сообщение: Re: best performance for simple dml