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 How to make a query faster. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to make a query faster." Watch "How to make a query faster." New topic
Author

How to make a query faster.

Gorakshanath Pandey
Greenhorn

Joined: Feb 25, 2004
Posts: 11
I have a sql query which works well. but the only problem with it
is its extremely slow.Its a compound query and i have to query DB2
database.I am using Java/JDBC to write a stored procedure
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
You need to identify the bottleneck: is it JDBC or DB2? Run the query from a command-line tool (i.e. not through JDBC). Is it still as slow?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Did you try adding indexes to your table? Also, try posting the query. Maybe someone here can give you tips on it.


[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: How to make a query faster.