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

Home -> Community -> Usenet -> c.d.o.server -> Re: query taking long time from java code

Re: query taking long time from java code

From: <palak123i_at_gmail.com>
Date: 26 Aug 2006 07:32:30 -0700
Message-ID: <1156602750.070284.12640@b28g2000cwb.googlegroups.com>


Hi,
Thanks for the reply. I will try this out. However I am not using pagination. I am trying to get a product list from database which has got 15+ million records. And the number of rows returned from the search are only 5-10...
Thanks,
Palak.

NitelyJoy wrote:

> This is because TOAD gives out the first rows as soon as they are
> fetched. Your query in TOAD takes as long as in java, if you wait for
> all result rows.
>
> Do a
>
> select count(*) from (
> <your_query>
> );
>
> in TOAD. Here, oracle must wait until all rows are fetched to calcucate
> the count.
>
> I think you have to implement paging in your java app. Pages that show
> lines 1-20, 21-40,... and so on. In your java code, you should do
> something like:
>
> select * from (
> <your_query>
> ) where rownum <= 20;
Received on Sat Aug 26 2006 - 09:32:30 CDT

Original text of this message

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