[Querying A Subset of Results in a Result Set]

[Querying A Subset of Results in a Result Set]

Post by chocchipcooki.. » Sun, 31 Dec 1899 09:00:00



Hi,

If I want to select a certain set of rows
from my result set, which is the best possible
way to do it?

So far, I have been using rownum to "chop" my
result sets.

Eg.
select <column A, column b...> from <some table>
where <column A> in (
select <column a> from <some table>
where <condition> and
rownum <= 40) order by <column A> DESC)
and rownum <= 20
order by <column A> ASC

is there a cleaner way?

what's "row" and "rows" used for in Oracle?
i cannot seem to find examples for the usage...

Thanks!

chocchipcookie

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. Result Sets vs copying result sets into memory.

Does anyone see a problem with copying a result set into a collection
for display vs looping through the result set for display, so I can
return the connection back to the database little faster? I am using
connection pooling, so there is no connection overhead in creating a
new query.

The only performance issue I can see that each result set will take up
memory, but after it's displayed, that memory will be available for
something else, right?  I'm in a situation where up to 500 people can
hit a webpage for data at the same time.

I'm starting to run out of database connections on the web application
and a bigger database isn't an option for me. I can (and do) cache
persistant non-changing data, but have been told that calls for
changing and updated data must always come straight from the database.

Some of the result sets are over 10000 records long and there's no way
to split them. Through sql, I am able to return only rows X through
X+20, so I only return what I am going to show.

Any POSITIVE feedback would be appreciated.

Thanks in advance,

-- ABS

2. CDBMA Internet Meeting (9/20/95)

3. Subset of a result set from a Stored Procedure

4. DAO 3.5

5. Selecting Subset of Result Set

6. Postgres and others

7. Returning a subset of a result set

8. Problem FileCopy NT Workstation in AS-400 Folder.

9. Returning a subset of a large query result

10. Read only a subset of a query-result

11. OBDB Result size <> ISQL Result Set

12. Comparing Result Set to Result Table

13. Receiving results of a SP result set