Skip to Content.
Sympa Menu

freetds - Re: SQLServer and executeQuery

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Curt Hagenlocher" <curt AT hagenlocher.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: SQLServer and executeQuery
  • Date: Tue, 7 Aug 2001 13:33:03 -0700


"Brent L Johnson" <brent AT bjohnson.net> wrote:

> 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?

This sounds like a SQL Server query optimization issue. You may
be able to get more help from comp.databases.ms-sqlserver (or
.sybase, as appropriate).

Generally, you will want to place your query in a stored procedure
and will want appropriate indexes so that the optimizer makes the
right choices. If it still doesn't do the right thing, you can
force the query plan using the option () and (index=xxx) notations.

--
Curt Hagenlocher
curt AT hagenlocher.org




Archive powered by MHonArc 2.6.24.

Top of Page