Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question and suggestion regarding rownum
Scrollable result set is in the JDBC 2.0 core API, which the Oracle JDBC
driver supports. Here's a good tutorial:
http://developer.java.sun.com/developer/Books/JDBCTutorial/
Regards,
Dave
mcstock wrote:
> Dave, > > you got a JDBC example (or a link to one)? > > --mcs > > "Dave Hau" <davehau_nospam_123_at_nospam_netscape.net> wrote in message > news:3FB40F1F.6010206_at_nospam_netscape.net... >
> is >>>>2) the rownum is assigned in the first enclosing query
>>>not guaranteed repeatable)
> ROWNUM >
> aliased >>>>
>>>ROWNUM value actually returned from the 1st enclosing query
> significant >
> (or >>>>
>>>PKs) then using these to page thru the data:
> for >>>>
>>>deptno = 10:
>>>1) 87 gets to select all rowids or empnos for deptno = 10
>>>2) 10 gets (no surprise) to select all data for 10 rows, by rowid
>>>3) 10 gets for each subsequent page
>>>-vs-
>>>1) 87 gets to select all rowids or empnos for deptno = 10
>>>2) 31 gets (no surprise) to select all data for 10 rows, by primary key
>>>3) 31 gets for each subsequent page
>>>-vs-
>>>1) 87 gets to select the 'first' page
>>>2) 87 gets to select the 'last' page
>>>3) 87 gets to select any page
>>>
>>>comparing gets per page for the 3 techniques
>>>
>>> ROWID PK ROWNUM
>>> 1st page 87 87 87
>>> Next page 10 31 87
>>> Per Page Averages
>>> 1 87.00 87.00 87.00
>>> 2 48.50 59.00 87.00
>>> 3 35.67 49.67 87.00
>>> 4 29.25 45.00 87.00
>>> 5 25.40 42.20 87.00
>>> 6 22.83 40.33 87.00