On Sun, Oct 08, 2006 at 23:04:02 +0200, Dirk Jagdmann <[EMAIL PROTECTED]> 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. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org