[freetds] fisql hangs on a query but tsql doesn't
Robert.Marsa at clickforensics.com
Thu Mar 18 12:32:11 EDT 2010
We are using SQL Server 2008 build 10.0.2734 and freetds v0.82 from Linux 2.6.31-19-server.
In doing further investigation, it seems that what is happening is the queries are being given different execution paths. When I issue the query with tsql I get a fast execution path that uses the indexes, but when I issue it with fisql, I get a slow execution path that does table scans. Because there are TB's of data, this makes the query take days to complete. So it doesn't appear that the driver is hanging.
So, tsql and fisql are using different settings. If I execute:
set quoted_identifier on
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
in fisql, then it works the same as tsql. I don't know if this is a bug in SQL server or what.
Anyway, issue resolved.
On Mar 17, 2010, at 15:33 , <jklowden at schemamania.org<mailto:jklowden at schemamania.org>> <jklowden at schemamania.org<mailto:jklowden at schemamania.org>> wrote:
On Wed, Mar 17, 2010 at 04:54:54PM -0500, Robert Marsa wrote:
I'm having a strange problem with freetds and MS SQL Server. Certain queries execute fine using tsql, but hang when using fisql, bsqldb, or my app which uses the db-lib API.
The behavior I see is that dbsqlexec() doesn't return. Examining the source indicates that dbsqlok() does more-or-less the same thing as tsql does.
If you would post an SQL script that illustrates what you're seeing, I will look at it.
We've had this complaint once before and were never able to verify it. Incorrect result processing is (or at least would be) an important bug.
Also, which version of FreeTDS and server are you using?
FreeTDS mailing list
FreeTDS at lists.ibiblio.org<mailto:FreeTDS at lists.ibiblio.org>
More information about the FreeTDS