Re: Guidance on INSERT RETURNING order - Mailing list pgsql-general

From Mike Bayer
Subject Re: Guidance on INSERT RETURNING order
Date
Msg-id 86f9eae7-acd6-45e7-b8a6-2a24b42fe306@app.fastmail.com
Whole thread Raw
In response to Re: Guidance on INSERT RETURNING order  (Thorsten Glaser <tg@evolvis.org>)
Responses Re: Guidance on INSERT RETURNING order
List pgsql-general
We do something different for uuids.  These are usually created client side anyway or are very easy to create client
sideif not and then we also have a separate sentinel column option.  

Overall the whole thing is an optimization that can be turned off for uncommon cases.   We just can't go back to having
insertof 1000 rows be 3-5x slower for all tables w server generated primary keys which is what statement at a time gets
us. Surrogate integer Pks w sequence or identity is the big case. 

On Wed, Apr 12, 2023, at 8:58 PM, Thorsten Glaser wrote:
> On Wed, 12 Apr 2023, Mike Bayer wrote:
>
>>ascending values for "mytable_id_seq" will correspond to the ascending
>>values for "num".
>
> But, again, what if it’s uuid or something instead of a sequence?
>
> bye,
> //mirabilos
> --
> 15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Guidance on INSERT RETURNING order
Next
From: David Rowley
Date:
Subject: Re: [E] Re: parallel aggregation