PL/SQL (MOSC)

MOSC Banner

Any alternative approach for my dynamic allocations

edited Mar 11, 2013 11:41PM in PL/SQL (MOSC) 7 commentsAnswered
Hi,  I am working on telecom domain here i have a requirement. I have a pool table say which is having around 5 lack records
  from the pool i have to pick one unallocated number and send back to calling application.

   table structure looks like

    Msisdn varchar2(20)   Primary key
    status   number(1)       -- 0 for unallocated   1- allocated.

i have to dynamically allocate a number which is of unallocated  and my query is

select msisdn
from xyz_pool
 where status = 0
and rownum<=1

since this query is most hit every time it scans all the 5 lack records . my primary key on msisdn but it won't  help in the above context

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