Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-28 Thread Richard Lynch
On Sat, January 26, 2008 3:22 am, Per Jessen wrote: Yeah, but that's just like running off-line reports and having them sent by email. It kind of ruins the idea of having the information available on-line in real-time. All depends how you define real :-) A lot of times, in a web app, the

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-28 Thread Per Jessen
Richard Lynch wrote: On Sat, January 26, 2008 3:22 am, Per Jessen wrote: Yeah, but that's just like running off-line reports and having them sent by email. It kind of ruins the idea of having the information available on-line in real-time. All depends how you define real :-) A lot of

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-26 Thread Per Jessen
Richard Lynch wrote: On Fri, January 25, 2008 5:07 am, Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, he wants to leverage the

RE: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-26 Thread Per Jessen
Richard Lynch wrote: Is it really going to help anything to slam the database with 3 X queries instead of just letting it finish one before you hit it again? You have a VERY good chance of just thrashing MySQL server instead of actually gaining any performance. It's an 8-way box with 8Gb

[PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Colin Guthrie
Per Jessen wrote: All, I have a website where some of the pages require several mysql queries - they're independent, so in principle they could easily be run in parallel. Has anyone looked at doing that? http://uk3.php.net/manual/en/function.mysqli-multi-query.php -- PHP General Mailing

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Per Jessen
Colin Guthrie wrote: Per Jessen wrote: All, I have a website where some of the pages require several mysql queries - they're independent, so in principle they could easily be run in parallel. Has anyone looked at doing that? http://uk3.php.net/manual/en/function.mysqli-multi-query.php

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Per Jessen
Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. /Per Jessen, Zürich -- PHP General Mailing List

[PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Colin Guthrie
Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Edward Kay
Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. If you're selecting data, could

RE: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Per Jessen
Edward Kay wrote: Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. If you're

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Floor Terra
On Jan 25, 2008 7:42 PM, Per Jessen [EMAIL PROTECTED] wrote: Try pcntl_fork() to create a child process for each query. Each child can make it's own MySQL connection. Hmm, interesting idea. I wonder if that'll work under apache? You have to compile with --enable-pcntl to use it. P.S. If

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Jochem Maas
Per Jessen schreef: Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. Try pcntl_fork() to create a child process for each query. Each

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 11:33 am, Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. Try pcntl_fork() to create a child process for each

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Jochem Maas
Nathan Nobbe schreef: On Jan 25, 2008 12:45 PM, Jochem Maas [EMAIL PROTECTED] wrote: you'll end up forking a complete apache process - assuming mod_php. you don't want that alright, Jocheem, now its my turn for a stupid question. doesnt apache fork a different process on each php request

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 5:07 am, Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, he wants to leverage the multi-threaded MySQL DB in

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 1:01 PM, Floor Terra [EMAIL PROTECTED] wrote: If all these apache/php processes are a problem, you could try a different setup: Write a SOAP (or silmilar) webservice in a language that does support proper threading. Now call your SOAP function from your php script to send the

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Floor Terra
On Jan 25, 2008 6:52 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 25, 2008 12:45 PM, Jochem Maas [EMAIL PROTECTED] wrote: you'll end up forking a complete apache process - assuming mod_php. you don't want that alright, Jocheem, now its my turn for a stupid question. doesnt apache

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Jochem Maas
Per Jessen schreef: Colin Guthrie wrote: Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. So

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 1:45 pm, Jochem Maas wrote: Richard Lynch schreef: On Fri, January 25, 2008 11:33 am, Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded???

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Jochem Maas
Richard Lynch schreef: On Fri, January 25, 2008 1:45 pm, Jochem Maas wrote: Richard Lynch schreef: On Fri, January 25, 2008 11:33 am, Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make

[PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Colin Guthrie
Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. So really what you want is

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Jochem Maas
Richard Lynch schreef: On Fri, January 25, 2008 11:33 am, Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. Try pcntl_fork() to create a

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Floor Terra
I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. Try pcntl_fork() to create a child process for each query. Each child can make it's own MySQL connection.

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Per Jessen
Colin Guthrie wrote: Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. So really what you

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Per Jessen
Floor Terra wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just the mysql queries. Try pcntl_fork() to create a child process for each query. Each child can make it's

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 12:45 PM, Jochem Maas [EMAIL PROTECTED] wrote: you'll end up forking a complete apache process - assuming mod_php. you don't want that alright, Jocheem, now its my turn for a stupid question. doesnt apache fork a different process on each php request anyway, if its complied w/

RE: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 6:11 am, Edward Kay wrote: Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make PHP multithreaded??? No, just

Re: [PHP] Re: how dod you get to do multiple mysql queries concurrently?

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 11:21 am, Jochem Maas wrote: Per Jessen schreef: Colin Guthrie wrote: Per Jessen wrote: Colin Guthrie wrote: Per Jessen wrote: I know how to do multiple queries - the key issue in my question was how to do them concurrently (i.e. in parallel). So you want to make