Advanced Queue ordering?

  • From: Steve Rospo <srospo@xxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 7 Jun 2005 15:31:22 -0700 (PDT)

I'm helping out a colleague here with some strange AQ behaviour.  We create
a queue with a sort_list of 'ENQ_TIME,PRIORITY'.  What we're seeing is
that if we have two concurrent sessions enqueuing to the same queue with
the PRIORITY value coming from a sequence.

The enqueue timeline looks like:

Session 1:              Session 2:

Enqueue priority 10
Enqueue priority 11
Enqueue priority 12
COMMIT

                        Enqueue priority 13
                        Enqueue priority 14
                        Enqueue priority 15
                        COMMIT

We do both of these quick succession such that the ENQ_TIME is the
same for both of the sessions.  After the two sessions run, we dequeue
from the queue using a single session and the messages come out like this:

Priority 10
Priority 13
Priority 11
Priority 14
Priority 12
Priority 15

We've tried to use the navigation of FIRST_MESSAGE and NEXT_MESSAGE and
the behavior doesn't change.  Has anyone seen this or know how to fix it?


-- 
Stephen Rospo        Principal Software Architect
Vallent Corporation (formerly Watchmark-Comnitel)
Stephen.Rospo@xxxxxxxxxxx           (425)564-8145

This email may contain confidential information. If you received this in
error, please notify the sender immediately by return email and delete this
message and any attachments. Thank you.



--
//www.freelists.org/webpage/oracle-l

Other related posts: