title: GV$PERSISTENT_QUEUES Fields
body: <p>I am wondering what the fields on the oracle table <code>GV$PERSISTENT_QUEUES</code> really mean.</p>
  
  <p>The Documentation:</p>
  
  <pre><code>ENQUEUED_MSGS           NUMBER  Number of messages enqueued
  DEQUEUED_MSGS           NUMBER  Number of messages dequeued
    Note: This column will not be incremented until all the subscribers of the message have dequeued the message and its retention time has elapsed.
  ...
  ENQUEUED_EXPIRY_MSGS    NUMBER  Number of messages enqueued with expiry
  ENQUEUED_DELAY_MSGS     NUMBER  Number of messages enqueued with delay
  MSGS_MADE_EXPIRED       NUMBER  Number of messages expired by time manager
  MSGS_MADE_READY         NUMBER  Number of messages made ready by time manager
  ...
  ENQUEUE_TRANSACTIONS    NUMBER  Number of enqueue transactions
  DEQUEUE_TRANSACTIONS    NUMBER  Number of dequeue transactions
  </code></pre>
  
  <p><a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_2092.htm#REFRN30460" rel="nofollow">Oracle Documentation (11.2)</a></p>
  
  <p>My Questions:</p>
  
  <ul>
  <li>How can the number of dequeued messages be larger than the number of enqueued messages?</li>
  <li>If messages with a certain delay get added to the queue, do they get counted at <code>ENQUEUED_MSGS</code> and <code>ENQUEUED_DELAY_MSGS</code>?</li>
  <li>If a message with a certain delay gets delivered after the delay, will it get counted at <code>DEQUEUED_MSGS</code> and <code>MSGS_MADE_READY</code>?
  <ul>
  <li>If so, how can <code>MSGS_MADE_READY</code> be larger than <code>ENQUEUED_DELAY_MSGS</code>?</li>
  </ul></li>
  <li>What do the fields <code>ENQUEUED_EXPIRY_MSGS</code> and <code>MSGS_MADE_EXPIRED</code> mean?</li>
  <li>What's the difference between <code>ENQUEUED_MSGS</code> and <code>ENQUEUE_TRANSACTIONS</code>, same with dequeueing?</li>
  </ul>
  
  <p>Thank you in advance for help!</p>