Skip to Content.
Sympa Menu

freetds - SQLServer and executeQuery

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Brent L Johnson" <brent AT bjohnson.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: SQLServer and executeQuery
  • Date: Tue, 7 Aug 2001 16:14:21 -0400


I think I've mentioned this before, but after more testing it's become a
huge problem (seeing as my client wants to start beta testing tomorrow).

I've put millisecond timers around lots of the code and I've found that the
executeQuery() statement is taking around 2 minutes 40 seconds to run my
query. This is not an acceptable time to wait for a simple report. Could
anyone give me any pointers of where else to look to fix this problem?

At first I thought it may be the FreeTDS driver. I downloaded the trial
version of the JTurbo driver and gave it a try and the queries are just as
slow. The wait time is between the executeQuery and actually processing the
results. Running through an rs.next() while loop is taking no time
(compared to the 2 mins of the query).

I also checked out the MS SQL Server machine and the task manager says that
the machine still has plenty of ram and CPU processing left - so it's not
even really flenching returning all the results.

Also, strangely enough, in my 2 min 40 sec query I was doing a "select top
10 ....". I found that if I removed the "top 10" and let it just return all
the results it lowered the time for executeQuery down to a little over a
minute (still not really acceptable).

Has anyone run into this? I really don't know where to turn! This is the
first time I've tried integrating a Linux box with a MS SQL Server
database - but using JDBC I didn't figure it would be any different than any
other database. Apparently not :) The tables I'm joining and querying from
are quite large by the way.

Any help would be GREATLY appreciated, thanks,

- Brent





Archive powered by MHonArc 2.6.24.

Top of Page