SQL Performance (MOSC)

MOSC Banner

Question about sequences - how many is too many?

edited Dec 27, 2014 10:01AM in SQL Performance (MOSC) 5 commentsAnswered

I have a table with a primary key based on a sequence.   This table has a column named org_id that defines the organization.  I have another sequential numeric column in the table that is unique for each organization.  To be brief:

create table messages

(message_id number,

org_id number,

org_message_id number);

(Don't worry about the business need of this second sequence - it is legitimate and/or too much work to change the logic - well too much work to convince the development team to deep dive into code that is already working).

Currently we don't use sequences to populate the org_message_id.  What we do is have a serial table that contains the next sequence for each organization, again, briefly:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center