Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Thousands of sequences OK?

Re: Thousands of sequences OK?

From: S. P. Pohilko <pohilko_at_prodigy.net>
Date: Tue, 19 Jan 1999 19:47:30 -0600
Message-ID: <36A535B2.93BB9A5E@prodigy.net>


Hi, Jerry!

Jerry Brennock wrote:

> I would like to replace the id table with sequences, but I could end up
> with roughly 10,000 people X 90 tables = 900,000 sequences. (There are
> also some options to get this down to about 40,000) My guess is that
> this would be politely referred to as a bad idea, but I would like to
> find out if anyone has created thousands of sequences in a database and
> what the result was. Or, if anyone knows some theoretical reason this
> would be bad.

That is really bad idea - to have 40K sequences. In Oracle, every sequence is
an object, you have to create 40K objects, that will be placed in Oracle dictionary.

You can simply use one object - one sequence, that will generate for you unique values. The max value is approx. 10**38. The only thing you have to do
to increase speed is to increase the number of cached values (default is 20),
when you will create this object.

Or create 10-20 sequences, and assign users to sequences by some algorithm (say, first letter of the name). This will decrease contention for values.

S.Peter Pohilko Received on Tue Jan 19 1999 - 19:47:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US