Skip to Content.
Sympa Menu

freetds - RE: SQLServer and executeQuery

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Patrick Amirian <PAmirian AT Insight.com>
  • To: "'TDS Development Group'" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: SQLServer and executeQuery
  • Date: Tue, 7 Aug 2001 13:33:12 -0700

Title: RE: [freetds] RE: SQLServer and executeQuery

humm... I've compiled PHP with FreeTDs and my queries take 1.15 second and I'm querying a HUGE database.

oh 1 thing, I've noticed that when I do this.

connect
select db
run query

it's MUCH faster than

connect
run query

give it a try I have it and it works super fast!! :)
l8r

-----Original Message-----
From: Matthew Reath [mailto:reathm AT cableconstructors.com]
Sent: Tuesday, August 07, 2001 4:33 PM
To: TDS Development Group
Subject: [freetds] RE: SQLServer and executeQuery


Have you tried placing the query in a stored procedure and calling the
procedure
from the code.  This has made things quick and efficient for me.  I use the
JTurbo driver
alot and it seems to be a good way encapsulate your data anyway.

Matthew Reath
Application Developer
reathm AT cableconstructors.com <mailto:reathm AT cableconstructors.com>
(906) 774 6621 x 2134


-----Original Message-----
From: bounce-freetds-133050 AT franklin.oit.unc.edu
[mailto:bounce-freetds-133050 AT franklin.oit.unc.edu]On Behalf Of Brent L
Johnson
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,

- Brent


---
You are currently subscribed to freetds as: [reathm AT cableconstructors.com]
To unsubscribe, forward this message to
$subst('Email.Unsub')


---
You are currently subscribed to freetds as: [PAmirian AT Insight.com]
To unsubscribe, forward this message to $subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page