Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I view a block of n rows anywhere in the table?

Re: How do I view a block of n rows anywhere in the table?

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Thu, 3 Jun 1999 16:28:27 +0100
Message-ID: <37569ce6.0@145.227.194.253>


I could se why it get slower the higher the value, if you want to see between 9500 and 10000 records, it has to fetch 10000 records before it narrows it down.

Unfortunately, i'm not aware of a method apart from your one which would be quicker ;-(

M

Steven Franklin wrote in message <37568A1A.A52F62C6_at_wcom.com>...
>I'm trying to look at block of n rows anywhere within the table. i.e.
>I don't want to format 250K rows for display in HTML. Rather, I'd like
>to be able to format and display a block of say 10 rows at a time and
>skip around through the table.
>
>This method seems to work, but it gets very slow when trying to
>look at rows further into the table.
>
>SELECT driver.key1,
> driver.key2,
> col1,
> col2
>FROM tbl,
> (SELECT /*+ INDEX(tbl idx_key2) */
> rownum rn,
> key1,
> key2
> FROM tbl
> WHERE rownum <= UpperRow) driver
>WHERE (tbl.key1=driver.key1) AND
> (tbl.key2=driver.key2) AND
> (rn >= LowerRow)
>
>where idx_key2 is an index with the desired sort order. And UpperRow and
>LowerRow define the boundries of the block want to look see.
>
Received on Thu Jun 03 1999 - 10:28:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US