[freetds] Cursors in freetds

James K. Lowden jklowden at schemamania.org
Tue Jul 6 21:17:35 EDT 2004

On Tue, 06 Jul 2004 <sorton9999 at usa.net> wrote:
> I still am of the mind that
> connecting to the database, running a query and collecting the data for
> use by an application is slower than running a query and collecting data
> and re-using the first connection.  

And you're absolutely right about that.   

I have a feeling we may be talking past each other.  If all you want to do
is send a query, read (all) the results, and repeat, then, sure, you
should "re-use" the connection.  No need to disconnect.  For webservers,
there's even a pool server designed to cache connections, the better to
avoid the overhead of logging in.  

If what you want to do is: send a query, read some results, use the
partially read results to issue another query -- kind of a nested loop
idea -- then cursors are potentially useful, as is maintaining two


More information about the FreeTDS mailing list