Skip site navigation (1) Skip section navigation (2)

Re: Very long SQL strings

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Very long SQL strings
Date: 2007-06-21 18:48:33
Message-ID: 20070621184833.GA10814@KanotixBox (view raw or flat)
Thread:
Lists: pgsql-performance
Steven Flatt <steven(dot)flatt(at)gmail(dot)com> schrieb:
> For example, on a toy table with two columns, I noticed about a 20% increase
> when bulking together 1000 tuples in one INSERT statement as opposed to doing
> 1000 individual INSERTS.  Would this be the same for 10000? 100000?  Does it
> depend on the width of the tuples or the data types?

I guess you can obtain the same if you pack all INSERTs into one
transaction. 

And, faster than INSERT: COPY.


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

In response to

Responses

pgsql-performance by date

Next:From: Francisco ReyesDate: 2007-06-21 18:58:33
Subject: Re: Database-wide VACUUM ANALYZE
Previous:From: Tom LaneDate: 2007-06-21 18:45:54
Subject: Re: Very long SQL strings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group