Peter Lind wrote:
Any you have a database that can actually handle that?
If the database is taking 0.1 seconds per query, and you have 10 queries,
then getting the data is going to take 1 second to generate. If you want
some slow query to be started, and come back for the data later, then I
thought we already had that? But again this is part of the database driver
anyway. No need to add threading to PHP to get the database connection to
pull data in the most efficient way. And one does not write the driver in
PHP? We are using C there already?
Exactly my point. 10 queries taking .1 second each running in serial
is 1 second total. How long would it take to run all those same
queries simultaneously??? What's so difficult about the concept of
serial vs parallel?
Hmm, just wondering, but how long do you think it will take your
high-traffic site to buckle under the load of the database queries you
want to execute when now you want all of them to execute at the same
time? Going with the "10 queries of .1 second each" ... how far do you
think you can scale that before you overload your database server? I'm
just wondering here, I could be completely off the bat.
No you are not off bat. That was the point I was trying to make but not very
well. A database connection will normally handle one query at a time, so they
have to be serial anyway unles you can create multiple connections. What I was
asking Tommy was how he expected the database to handle 10 queries in parallel.
Yes ten cores could possibly parallel up the work, but on the whole, the
database end is going to serialise a lot of that work, so what is the real gain?
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