File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Long Query execution time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Long Query execution time" Watch "Long Query execution time" New topic
Author

Long Query execution time

Manigandan Velraj
Greenhorn

Joined: Nov 30, 2009
Posts: 14
Hi,

I am developing a search page which searches oracle DB where i have a oracle select query which has 4 unions. Some queries takes 25 secs to execute some queries. When the user clicks search button i get "Internal server error (page cannot be displayed)" some times. instead i need to show the users some message. i tried all possible query tuning.

I want to either increase the browser response time / if the response takes long time, display a message. please help me in this regard.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

Unions are generally very poor query operators and should be avoided at all costs. As for general query performance, you should consider indices to improve performance as well as db tuning wizards.


My Blog: Down Home Country Coding with Scott Selikoff
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31054
    
162

Can you post the query here? Maybe it can be tuned. Or maybe you can do it in 4 pieces. Or maybe there will be other ideas.

As far as what to do if it must take a long time, see user notification messages.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Long Query execution time