Re: jtds driver and SQL Server performance problem

From: Joe Weinstein (joeNOSPAM_at_bea.com)
Date: 01/16/05


Date: Sat, 15 Jan 2005 15:04:44 -0800
To: Stuart Leonard <suncds@verizon.net>


Stuart Leonard wrote:

> I am using the opensource jtds driver to retreive information from an SQL
> Server database. The java application and the SQL Server database both
> reside on the local (c:) drive.
>
> I am using a PreparedStatement object to retrieve a single row from the SQL
> Server database. The "Where" clause of the "Select" statement specifies a
> field that is both a unique and a primary key. The retreival time is
> approximately .6/10ths to 7/10ths of a second, which is horrible.
>
> I am using another PreparedStatement in the java program to retreive a
> single record from a table. The "Where" clause specifies a field that
> contains an index (not primary, not unique), and this retreival is taking
> approximately 10/1000ths of a second.
>
> I cannot come to a conclusion as to why the first record retreival is taking
> so long. Both tables are fairly large (approx. 1.5 million rows) for each
> table. Also, I am selecting only the fields that are needed (I am not
> performing a "Select *")
>
> If anyone can provide me with some debugging ideas, I would appreciate it.

Is the slow query using a string variable to define the value of a VARCHAR
column?
Joe Weinstein at BEA



Relevant Pages

  • Re: jtds driver and SQL Server performance problem
    ... > I am using the opensource jtds driver to retreive information from an SQL ... The java application and the SQL Server database both ... > field that is both a unique and a primary key. ...
    (comp.lang.java.databases)
  • Re: Project 2002 to 2003 Error
    ... Project 2003 client on this single SQL Server database for MS Project data. ... We also use a single resource pool that is linked to ... It is my understanding that Project 2003 upgrades any project that has ...
    (microsoft.public.project)
  • Working with "Default text" in a Word doc. Form Text field
    ... places values from a SQL Server database into Form ... fields in the doc (Text fields and Checkbox fields), ... with Entry macro, Exit macro, Help text, etc. ...
    (microsoft.public.vb.directx)
  • jtds driver and SQL Server performance problem
    ... I am using the opensource jtds driver to retreive information from an SQL ... The java application and the SQL Server database both ... Both tables are fairly large (approx. ...
    (comp.lang.java.databases)
  • Re: which programming is good for front end application to link to SQL
    ... Are you asking which programming language to use to create a front end ... for a SQL Server database? ... well as a very good drag and drop GUI designer. ... If you are a Java developer then you can use Java, ...
    (microsoft.public.sqlserver.clients)