Re: Chaining inserts ... This would be cool

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Chaining inserts ... This would be cool
Date: 2012-04-24 01:43:21
Message-ID: CAPTjJmpxA5AB-j+OvoYJGFb=AGLrEsef7h4AHSVs9F08SvqzMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 24, 2012 at 11:30 AM, David Fetter <david(at)fetter(dot)org> wrote:
> On Tue, Apr 24, 2012 at 08:12:10AM +1000, Chris Angelico wrote:
>> Of course, the question I never asked (never bothered to, really)
>> was: Is it really any better than simply doing the first insert and
>> retrieving the ID in my application? :)
>
> One crucial difference is the number of round trips to the database.

Yeah, which gives it the potential to be faster, but I never actually
measured anything. Would be curious to know if it becomes better at X
table size, or something.

ChrisA

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rafal Pietrak 2012-04-24 07:02:56 how to make an SQL UPDATE from record returning function
Previous Message David Fetter 2012-04-24 01:30:46 Re: Chaining inserts ... This would be cool