Re: Will PHP ever "grow up" and have threading?
| From: | Lester Caine | Date: | Wed, 24 Mar 2010 11:21:36 +0000 |
| Subject: | Re: Will PHP ever "grow up" and have threading? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303254@lists.php.net to get a copy of this message | ||
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?
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.phpExactly 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.