Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query results over 200 000 Records ?!?!!??!
Filiz Duman wrote:
> Hi All,
>
> I was just wondering what can I change in my code, database set-up, table
> set-up
> if I want to run a query which returns usually over 200 000 records.
>
> I am actually using the Apache web server with Oracle 8.1.7 database and a
> web front end (created with database packages PLSQL), but since the query
> does take a very long time to execute (20 min) the user is unable to see the
> results on the web page.
>
> Any ideas ?
>
Your client submits the PL/SQL to the database. Oracle churns away,
grabbing all 200,000 rows. It has no idea that you only want one (or a
few) rows to display on your web page. So your users have to wait for
Oracle to finish before they see a single web result (maybe you even
threw a sort in there to order the output).
You have to modify your query to return a smaller result set (so the backend Oracle can grab your data quickly). There are a variety of ways to accomplish this. Things like returning 20 rows at a time. Received on Mon Nov 25 2002 - 11:55:46 CST