SQLServer and executeQuery
reathm at cableconstructors.com
Tue Aug 7 16:32:58 EDT 2001
Have you tried placing the query in a stored procedure and calling the
from the code. This has made things quick and efficient for me. I use the
alot and it seems to be a good way encapsulate your data anyway.
reathm at cableconstructors.com <mailto:reathm at cableconstructors.com>
(906) 774 6621 x 2134
From: bounce-freetds-133050 at franklin.oit.unc.edu
[mailto:bounce-freetds-133050 at franklin.oit.unc.edu]On Behalf Of Brent L
Sent: Tuesday, August 07, 2001 3:14 PM
To: TDS Development Group
Subject: [freetds] SQLServer and executeQuery
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,
You are currently subscribed to freetds as: [reathm at cableconstructors.com]
To unsubscribe, forward this message to
More information about the FreeTDS