Currently, I have one problem in my J2EE application. I have one SELECT query that joins up 8-10 tables at a time and it took around 7-10 minutes (we have optimized it...it was 30-40 minutes before) to execute the query as it returns quite lot of data (>60,000 records). Now, the problem is that it "jammed up" our application server and the queues are exhausted.
Now, I was thinking to use ROWNUM in Oracle to implement the "efficient" pagination. However, it seems that although I specify the ROWNUM, the whole SELECT statement is executed first then only the defined number of records are taken out from the result of the SELECT statement. Hence, it does not solve my problem as the bottleneck is actually on the SELECT statement itself (7-10 minutes).
Hence, can anyone who expert in Java or Oracle suggest me some solid solution here?