From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Dirk Jagdmann <jagdmann(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: optimal insert |
Date: | 2006-10-09 04:09:24 |
Message-ID: | 20061009040924.GA20636@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Sun, Oct 08, 2006 at 23:04:02 +0200,
Dirk Jagdmann <jagdmann(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Kyle Bateman | 2006-10-09 05:27:40 | Re: PG 8.2beta reordering working for this case? |
Previous Message | Dirk Jagdmann | 2006-10-08 21:04:02 | optimal insert |