Skip to Content.
Sympa Menu

freetds - Re: [freetds] Cursors in freetds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Cursors in freetds
  • Date: Tue, 6 Jul 2004 21:17:35 -0400

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
connections.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page