Subject | RE: [IBDI] Re: Firebird 1 |
---|---|
Author | Paulo Gaspar |
Post date | 2001-06-06T11:17:22Z |
Answer inline:
That is even the reason Oracle gives for why something like:
SELECT * FROM someTable WHERE ROWNUM>100 ORDER BY someCol
to get rows after the first 100 does not work, while
SELECT * FROM someTable WHERE ROWNUM<=100 ORDER BY someCol
to get the first 100 rows works. (Ok, Oracle could be smarter.)
ROWNUM still helps achieving "getting rows after the first 100" or
getting a range/page of rows when combined with other techniques - a
SELECT over a SELECT in Oracle and a Stored Procedure in Interbase
(AFAIK).
=:o)
Have fun,
Paulo Gaspar
> -----Original Message-----Exactly.
> From: Ann W. Harrison [mailto:aharrison@...]
> Sent: Tuesday, June 05, 2001 10:16 PM
>
> At 03:01 PM 6/5/2001 -0400, Ed Malloy wrote:
>
> >AND, I am totally lost on this idea of ROWNUM. How can we have ROWNUM
> >in a relational database? We are not guaranteed any ordering of the raw
> >data. Am I missing something.....
>
> I think ROWNUM is somewhat like an old QLI thing called 'running count';
> to produce a numbered list, you'd say something like
> ...
That is even the reason Oracle gives for why something like:
SELECT * FROM someTable WHERE ROWNUM>100 ORDER BY someCol
to get rows after the first 100 does not work, while
SELECT * FROM someTable WHERE ROWNUM<=100 ORDER BY someCol
to get the first 100 rows works. (Ok, Oracle could be smarter.)
ROWNUM still helps achieving "getting rows after the first 100" or
getting a range/page of rows when combined with other techniques - a
SELECT over a SELECT in Oracle and a Stored Procedure in Interbase
(AFAIK).
> >However, I don't see any problem... Wouldn't we just read All of theThanks Ann, you make it more clear than I did.
> >data into a data structure in memory and assign row numbers to this
> >stucture and supply the data sets to the various pages from here. Is it
> >critical that these data are not "live?" Couldn't that be solved by
> >alowing the user to update the data at any time? what's the problem.
>
> The problem is that users often ask for a huge stack of data, look at
> the first 10 items, pick one, and go off happy, leaving the data structure
> in memory full of unwanted stuff. Since there's no real way to know that
> the user has disappeared in a Web app, there's no good algorithm for
> releasing the data.
> ...
=:o)
Have fun,
Paulo Gaspar