Per Jessen wrote:
Tommy Pham wrote:
I'm presenting the argument for threading. Per is presenting the work
around using asynchronous queries via mysqlnd. I did read that link a
few days ago, "Although the user can send multiple queries at once,
multiple queries cannot be sent over a busy connection. If a query is
sent while the connection is busy, it waits until the last query is
finished and discards all its results." Which sounds like threads ->
multiple connections to not run into that problem.
You must have read the wrong page. This is NOT about multiple queries,
it's about _asynchronous_ queries.
The only problem here is what the database client can handle. If it can only
handle one active query, then that is all that can be used. It can be started
asynchronously and then you come back to pick up the results later, and so you
can be formating the page ready to insert the results. PDO requires that you
start a different connection in a different transaction for each of these
queries, but that is another hot potato. Running 10 asynchronous queries would
require 10 connections as that is how the database end works. Adding threading
to PHP is going to make no difference?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php