Re: optimal insert

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: optimal insert
Дата
Msg-id 20061009040924.GA20636@wolff.to
обсуждение исходный текст
Ответ на optimal insert  ("Dirk Jagdmann" <jagdmann@gmail.com>)
Список pgsql-sql
On Sun, Oct 08, 2006 at 23:04:02 +0200, Dirk Jagdmann <jagdmann@gmail.com> wrote:
> 
> insert into a_b(a,b) values(1,100);
> insert into a_b(a,b) values(1,200);
> insert into a_b(a,b) values(1,54);
> insert into a_b(a,b) values(1,4577);
> 
> So for a batch of inserts the value of a stays the same, while for by
> arbitrary values are inserted. Now I have wondered if PostreSQL offers
> a smarter way to insert those values? A solution can contains usage of
> some plpgsql code.

I don't think you are going to be able to save anything by 'a' being fixed
unless there is a way to compute 'b', so that you can use a select statement.

Just do the normal stuff you would when speeding up inserts. The biggest
probably being wrapping them all up in one transaction.


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

Предыдущее
От: "Dirk Jagdmann"
Дата:
Сообщение: optimal insert
Следующее
От: Kyle Bateman
Дата:
Сообщение: Re: PG 8.2beta reordering working for this case?