[freetds] Cursors in freetds

Steven Orton sorton9999 at usa.net
Wed Jul 7 09:38:40 EDT 2004


  I think I'm embarrasing myself.  You are absolutely right about talking past
each other:)  I'm talking about connection speeds and you're talking about
cursors.  I don't know how I got on that subject.  The use I wanted for
cursors is getting a resultset and searching through it possibly multiple
times instead of copying data to local data structures and then performing the
search(s).  I think that would be useful to me and is also not correctly
implemented in the C++ API that I'm using even though the driver we use
supports cursors.

  Sorry about the confusion...steve---



"James K. Lowden" <jklowden at schemamania.org> wrote:

> 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
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 



-------------------------------
Steven Orton
sorton9999 at usa.net
--
INEPTITUDE: If you can't learn to do
 something well, learn to enjoy doing
 it poorly.
--
"Put your hand on a hot stove for a minute,
 and it seems like an hour.
 Sit with a pretty girl for an hour, and it
 seems like a minute. THAT'S relativity."
        -- Albert Einstein
-------------------------------





More information about the FreeTDS mailing list