JDBC shows poor performance when selecting from a view

Posted on 2005-04-29
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

    >> 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

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    canBalance challenge 34 56
    strCount chalenge 3 35
    word0 challenge 4 37
    JAVA part two 4 10
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    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 learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now