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

From: <sybrandb_at_hccnet.nl>
Date: Tue, 03 Feb 2009 14:49:19 +0100
Message-ID: <skigo416528e0qv6ut9vl1dk202nh8497t_at_4ax.com>



On Mon, 2 Feb 2009 20:49:40 -0800 (PST), krislioe_at_gmail.com wrote:

>Yes, the requirement does not tolerate gap, that is why we use the
>'old' solution using a special table/column for the counter.
>

The 'old' solution is basically unscalable.

>That is also why we want to put the process of the numbering into a
>stand alone session (background process)

Which makes sure your application is even more unscalable. Apart from that you need to ensure uniqueness by other means. Did you take that into account?
>
>I think of DBMS_SCHEDULER, but how to prevent it hogging cpu
>utilzation, because it has to always run to give number the unnumbered
>transactions.
>

The best way to prevent this is by simply not using it. Dbms_scheduler is not a lightweigth mechanism. Basically you are going to make sure your application will come to a grinding halt.
Not surprising, giving your posting history.

>Thank you
>xtanto

Sybrand Bakker
Senior Oracle DBA Received on Tue Feb 03 2009 - 07:49:19 CST

Original text of this message