aspose file tools
The moose likes JDBC and the fly likes Statements executing VERY slowly Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Statements executing VERY slowly" Watch "Statements executing VERY slowly" New topic
Author

Statements executing VERY slowly

Alana Sparx
Ranch Hand

Joined: Feb 14, 2006
Posts: 121
Hi all

Statements we execute against the database are VERY SLOW INDEED.

The sql is generated by Hibernate.
The application server is Webshpere Community Edition.
The database is Sql Server 2005.
The database driver is the jTDS driver.

If we take the sql generated by hibernate and execute it directly against the database, the query flies along.
If we take the sql and execute it as a prepared statement through a jdbc connection, again it flies along.
When we use the service that ultimately calls the Hibernate classes, we are waiting in excess of 60 seconds for the query to complete.

Does anyone have any pointers that can help remedy this?

I've also posted a similar question here, on the Websphere Forum
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Are you running out of memory? Check the amount of virtual memory your JVM is using - you may need to increase it.

Also, what is your network connection between your Hibernate app. and the DB like?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Statements executing VERY slowly
 
Similar Threads
Not able to execute Select and delete queries
Dynamic Vs Static SQL
connection to mssql server database
Slow Prepared Statement Execution Through Websphere
Java application Microsoft SQL server