Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Calculating with ROWID
Following problem: I create
table XX(docnum number) with a subselect. Usually the table contains
about 1.000.000 rows. For some reasons some JDBC client application
need to access some of the first rows or some of the last rows of the table.
Accessing the first rows is very fast when I use a scrollable resultset and when I use ResultSet.absolute(num) to the cursor to the position I want. But ResultSet.last() takes very very long. I think the cursor runs through the complete table. Any idea how to make this better ?
My idea: get the ROWID of the first row and do some calculations. It seems That ROWID consist of an alphabet [A-Za-z0-9+/]. So it would be possible to calculate the ROWID of the n-th row. Is this assumption right ? Received on Fri Oct 20 2000 - 04:00:40 CDT