Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence Table
"Jason Webber" <webber_at_mminternet_spam.com> wrote in message news:<u8drov2ja44k82_at_corp.supernews.com>...
> I need a way to have a sequence for a given amount of mobile assets for a
> messaging system. Each message gets assigned a sequence number. Each
> mobile asset needs to have its own sequence to get the next number from. I
> don't think creating a sequence object for each mobile asset sounds
> appropriate in this case since I would have to create a new sequence each
> time I add a mobile asset. Right now there could very easily be 500,000 of
> these mobile assets. I thought of just creating a table, with a varchar2
> being a unique descriptor of a mobile asset and another column representing
> the sequence number. Is there a better way to do this so that two threads
> in my application that are running and try to get the next sequence number
> don't end up with the same number.
>
> TIA
Jason, why does each asset have to have its own sequence generator?
Do the numbers have to be sequential? If there is no need for the
numbers to be sequential then is there a limit to the sequence number
size so that such a large number of mobile assets would cause one
sequence to cycle too quickly for your use?
Depending on the answers then you might need your own sequence table since you will have a separate key for every device then row level lock blocking should not occur providing you do not have to deal with multiple concurrent messages to and from the same device. Perhaps the anonymous transaction feature might also be necessary depending on the unlisted detail requirements of this process.
HTH
-- Mark D Powell --
Received on Thu Mar 07 2002 - 09:21:04 CST
![]() |
![]() |