RE: Slow response time from Java compared to Query Analyzer

From: Carb Simien [MSFT] (CarbinoS_at_online.microsoft.com)
Date: 11/22/04

  • Next message: Jame Peterson: "jdbc classpath for linux"
    Date: Mon, 22 Nov 2004 23:04:57 GMT
    
    

    --------------------
    | From: Utkarsh Mohta <umohta@mmm.com>
    | X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
    | Subject: Slow response time from Java compared to Query Analyzer
    | Mime-Version: 1.0
    | Content-Type: text/plain; charset="us-ascii"
    | Content-Transfer-Encoding: 7bit
    | Message-ID: <efJqLaN0EHA.1308@TK2MSFTNGP09.phx.gbl>
    | Newsgroups: microsoft.public.sqlserver.jdbcdriver
    | Date: Mon, 22 Nov 2004 13:02:14 -0800
    | NNTP-Posting-Host: 67.41.129.85
    | Lines: 1
    | Path:
    cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
    .phx.gbl
    | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6503
    | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
    |
    | Hi,
    | I have an application in Java WSAD 5.1 which uses the SQL Server
    | database. I use the microsoft jdbc type 4 driver.
    | The query execution time for a particular query is 800 MS from the java
    | program while in SQL query analyzer it is 100 MS.
    | I am using prepared statement in my query from Java.
    |
    | I am already setting the datasource parameter
    | sendStringParametersAsUnicode to false
    |
    | Thanks
    |
    |
    | *** Sent via Developersdex http://www.developersdex.com ***
    | Don't just participate in USENET...get rewarded for it!
    |

    A bunch of questions:

    1. What SelectMethod are you using in your connection string?
    2. What is the query execution plan you observe in both scenarios if you
    run SQL Profiler (Query Analyzer vs. JDBC)?
    3. Can you execute the query in a standalone Java console app and see the
    same results?
    4. Does this problem occurs for all queries or just the one you are testing?

    Please post your Java code, table schema, and indicate the number of rows
    that exist in the table.

    Carb Simien, MCSE MCDBA MCAD
    Microsoft Developer Support - Web Data

    Please reply only to the newsgroups.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Are you secure? For information about the Strategic Technology Protection
    Program and to order your FREE Security Tool Kit, please visit
    http://www.microsoft.com/security.


  • Next message: Jame Peterson: "jdbc classpath for linux"

    Relevant Pages

    • Re: dynamic type checking - a pauline conversion?
      ... to actually write the code in Java. ... Is the query handled ... One of the problems with Java typing is small differences in interfaces ... array iteration, List iteration, and database query result iteration all ...
      (comp.object)
    • Re: Cant get JDBC to work from Java to MySQL
      ... ResultSet rs = stat.executeQuery("SELECT draw_date FROM ... (Java, Stack trace, and table description - stack trace from the code ... compiles and prints! ... SQL Exception:Unexpected exception encountered during query. ...
      (comp.lang.java.programmer)
    • Re: Query LDAP from Linux??
      ... > I have a developer that wants to be able to query AD ... > using a Java based Linux app, what to I need to tell him ... have to explicitly send a bind request with the DN of a domain account. ... This should be no problem with any Java LDAP API ...
      (microsoft.public.windows.server.active_directory)
    • Re: Selecting Multivalues
      ... association to exist in the file and in the query, ... JavaScript; or those writing VB who are asked to write Java. ... distinguish between an empty dynamic array, ...
      (comp.databases.pick)
    • Re: where to get mySQL questions answered?
      ... In message, Randell D. ... Remember Google keeps a good index of the newsgroups and I ... >query works with one word, but not two - and it seems that your code might ... >be passing the syntax of the query wrongly (perhaps leaving your database ...
      (comp.lang.php)