[freetds] Connection support only one query at a time
freddy77 at gmail.com
Fri May 22 11:56:25 EDT 2009
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.
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).
More information about the FreeTDS