Re: Performance on inserts - Mailing list pgsql-hackers

From Matthew Kirkwood
Subject Re: Performance on inserts
Date
Msg-id Pine.LNX.4.10.10008261206200.27577-100000@sphinx.mythic-beasts.com
Whole thread Raw
In response to Re: Performance on inserts  (Jules Bean <jules@jellybean.co.uk>)
Responses Re: Performance on inserts
Re: Performance on inserts
Re: Performance on inserts
List pgsql-hackers
On Sat, 26 Aug 2000, Jules Bean wrote:

> Is there any simple way for Pg to combine inserts into one bulk?
> Specifically, their effect on the index files.  It has always seemed
> to me to be one of the (many) glaring flaws in SQL that the INSERT
> statement only takes one row at a time.

One of MySQL's little syntax abuses allows:

INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..);

which is nice for avoiding database round trips.  It's one
of the reasons that mysql can do a bulk import so quickly.

> But, using INSERT ... SELECT, I can imagine that it might be possible
> to do 'bulk' index updating. so that scanning process is done once per
> 'batch'.

Logic for these two cases would be excellent.

Matthew.



pgsql-hackers by date:

Previous
From: Jules Bean
Date:
Subject: Re: Performance on inserts
Next
From: Alfred Perlstein
Date:
Subject: Re: Performance on inserts