Re: How to create pl/sql that run efficiently in background ?

From: <krislioe_at_gmail.com>
Date: Mon, 2 Feb 2009 20:02:47 -0800 (PST)
Message-ID: <14bf69ad-ac27-4119-9e67-accdb78d483d_at_n33g2000pri.googlegroups.com>



On Feb 3, 10:43 am, Palooka <nob..._at_nowhere.com> wrote:
> krisl..._at_gmail.com wrote:
> > Hi sql gurus,
>
> > We have application on Oracle 10g where 150+users (from multiple
> > branch) concurrently input transaction. The transaction number is
> > centralized, means all user use same transaction number counter.
>
> > To avoid the contention that occured, we think of using pl/sql
> > procedure that run in background to do :
> > - select transaction that not yet has number
> > - query the last transaction number counter(a column in a table),
> > increment by 1, update the transaction with the number
> > - commit
> > - process another transaction
>
> > What is the best approach to do this ?
> > (means a pl/sql that does not cause high CPU utilization, because it
> > will run all day long to look for unnumbered transaction)
>
> Ever heard of sequences?- Hide quoted text -
>
> - Show quoted text -

Yes, we avoid sequence because we have to meet the classic requirement : there should not be any numbering gap.

Thanks
xtanto Received on Mon Feb 02 2009 - 22:02:47 CST

Original text of this message