Re: Scalable sequence session prefix size

From: Jonathan Lewis <jlewisoracle_at_gmail.com>
Date: Fri, 30 Apr 2021 15:52:10 +0100
Message-ID: <CAGtsp8=R0vxekk8Y0cqq-X9ZgGtzSkT62taWYBdsNyrsuYEnvw_at_mail.gmail.com>



That shouldn't give you duplicate IDs - it is likely to give you two sessions generating values that belong in the same leaf block if you're using the sequence to generate a unique/primary key, but the lower N digits of the sequence number ought to be different.

Regards
Jonathan Lewis

On Fri, 30 Apr 2021 at 14:59, Thomas Ranchon <thomas_at_ranchon.org> wrote:

> Hi all,
>
> I have an insert statement that is using a scalable sequence to generate
> an id.
> This insert statement is running in PARALLEL(16) mode.
> Sometimes duplicate ids are generated because 2 of the 16 sessions doing
> the insert share the same (session_id%1000) that is used by the scalable
> sequence to make the session prefix of the sequence.
>
> Is there a way to increase the size of the session prefix in the sequence
> that would avoid those duplicates ids ?
>
> Thank you and best regards
> Thomas Ranchon
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 30 2021 - 16:52:10 CEST

Original text of this message