freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Connection support only one query at a time
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Connection support only one query at a time
- Date: Fri, 22 May 2009 09:48:01 -0400
Matthias Cramer wrote:
>
> I use DBI:Sybase in perl to connect to a MS SQL Server 2008. I do
> several thousand queries in my script and for each it needs to open a
> new connection.
Why do you need to open a second connection every time? Just maintain two
connections.
There's no "workaround" in the sense that the TDS protocol requires the
client to finish processing the results of a query before issuing another
query on the same connection. Nothing prevents a client from maintaining
multiple connections, though.
Think of it like a file: your program can have several files open at a
time, but each file handle deals with only one file.
In case you're concerned about the overhead of maintaining the connection,
don't be. The original Sybase design minimized the memory requirements to
maintain a connection. At one time it was 15 KB. As of SQL Server 6.5
it seems to have been 44 KB (http://support.microsoft.com/kb/160234). I
haven't been able to find more recent information, but it would be in the
vendor's interest to continue to keep it as small as possible.
HTH.
--jkl
-
[freetds] Connection support only one query at a time,
Matthias Cramer, 05/22/2009
-
Re: [freetds] Connection support only one query at a time,
James K. Lowden, 05/22/2009
-
Re: [freetds] Connection support only one query at a time,
Matthias Cramer, 05/22/2009
- Re: [freetds] Connection support only one query at a time, Frediano Ziglio, 05/22/2009
-
Re: [freetds] Connection support only one query at a time,
Matthias Cramer, 05/22/2009
- Re: [freetds] Connection support only one query at a time, Gunther Van Butsele, 05/22/2009
-
Re: [freetds] Connection support only one query at a time,
James K. Lowden, 05/22/2009
Archive powered by MHonArc 2.6.24.