Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Sorting Oracle Records by TimeStamp field Question!
I have a question regarding the results returned by the following
query:
select EVENT_ID, PRIMARY_KEY from EVENT where PTS_CONFIRM = 0 and ROWNUM = 1 order by EVENT_PC
where the index is defined as
CREATE INDEX EVENT_PC ON EVENT (PTS_CONFIRM, CREATE_TIMESTAMP)
My question(s) are as follows:
1) Will this not provide me with the oldest record where the
PTS_CONFIRM field is zero? I am being told that it cannot guarantee
that we will retrieve the oldest record? How is this possible?
2) Secondly, I am told having a timestamp field in an index is an expensive operation is this true? Received on Thu Nov 20 2003 - 08:07:12 CST