>>>>> "JR" == Justin Rudd <[EMAIL PROTECTED]> writes:
JR> SELECT id, enqueued_datetime, begin_dequeue_datetime, content FROM
JR> messages WHERE release_datetime < ? and begin_dequeue_datetime = 0 FOR
JR> UPDATE begin_dequeue_datetime
JR> Where the first '?' in the select is the time which the query came in
JR> (System.currentTimeMillis()).
JR> It uses the IxMsgsRel index, but the ordering doesn't appear to use
JR> that index. The query log doesn't show me what it is using for
JR> sortation. I would have expected the sortation order to be
JR> release_datetime and then enqueued_datetime. It wouldn't be strict
JR> fifo, but it would be close enough.
JR> So how do I tell what Derby is using for sortation?
If you want a specific ordering, you should add an "ORDER BY" clause
to your statement.
--
Øystein