Re: Connection support only one query at a time

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <1243007785.7563.3.camel@freddy>
Il giorno ven, 22/05/2009 alle 17.45 +0200, Matthias Cramer ha scritto:
> Hi James
> 
> You're my hero of the day ... I now open two connections at the beginning of my script. One to the outer loop and one for the inner querries.
> 
> Execution time of my script is now down to 17s from >90s ... great.
> 
> Thanks again for the enlightenment.
> 
> Regards
> 
>   Matthias
> 

If you use ODBC (like DBD::ODBC) you can even use cursors.
Just use cursor for outer loop and normal queries for inner ones.
Also consider using other types queries or handle code all in server.
Honestly I had to use client side cursors only a time in my life, in
this case processing every row and updating the same row on some
complicated conditions (where computation was not possible on server).

Regards
  Frediano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.