Re: Re: how dod you get to do multiple mysql queries concurrently?
| From: | Per Jessen | Date: | Sat, 26 Jan 2008 09:22:16 +0000 |
| Subject: | Re: Re: how dod you get to do multiple mysql queries concurrently? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268150@lists.php.net to get a copy of this message | ||
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 multi-threaded MySQL DB in the background
> to have *IT* running several queries at once.
Exactly.
> I suspect the overhead of bridging to/from that other thing would
> dwarf the query times, unless you're running queries that are too long
> to start with...
They are too long. I have e.g. two queries that each take 30 seconds,
so a total of 60 seconds. Running in parallel would reduce runtime by
50%.
> In which case you should queue them up in a list of "jobs" and notify
> the users when they are finished instead of making the user wait
> around.
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.
/Per Jessen, Zürich