JDBC shows poor performance when selecting from a view

Posted on 2005-04-29
Medium Priority
Last Modified: 2010-03-31
I'm not sure if this is the correct place to ask this question.  If it's not, please direct me to the appropiate topic area.

I am using SQL Server 2000 with the latest JDBC drivers from Microsoft.  I am executing a query where the I am selecting from a VIEW.  It appears to be pretty straight forward but the response time is very slow.  When I run the same query in Query Analyzer, the response time is very fast.  Does anyone know of any issues with JDBC and selecting rows from a VIEW.  Thanks.
Question by:pcarrollnf
1 Comment
LVL 15

Accepted Solution

aozarov earned 500 total points
ID: 13912394
>> Does anyone know of any issues with JDBC and selecting rows from a VIEW
I don't think so. (if it runs fine using another non-jdbc client).
Verify where is the slow part, hence put System.out.println before and after executing the statement and then after you completed the ResultSet iterations.
Your slowness might be part of the latter...
You can increase the statement fetch size Statement#setFetchSize if your result set is very big.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month15 days, 22 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question