Re: same reseult set with less column

From: <>
Date: Mon, 29 Sep 2008 07:20:06 -0700 (PDT)
Message-ID: <>

On Sep 28, 9:46 pm, Ed Prochak <> wrote:

> Since you are using JAVA, why not open the cursor, fetch the N rows
> you need and close the cursor?
> No offense intended, DT, but I've never been a fan of ROWNUM. It leads
> to wrong thinking about database results. The row count treats results
> like records instead of rows. And funny how it always seems to be web
> apps that use this most often.
> Can you describe what constitutes the TOP N rows? What ordering do you
> use? Often if you can describe the rule you can code it into the
> query.

Ed, thanks for your advice. Because the data may contains hundreds of thousands of rows, it takes a lot of memory to read all of them. So I use "lazy read" to read only one page at a time and when users want to see a page that is not already in memory, then I will fetch that page only. So I use the top-N to read that page.

Here is what I use :

DT Received on Mon Sep 29 2008 - 09:20:06 CDT

Original text of this message