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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 the mysql queries.
>>
>
> If you're selecting data, could you not reduce the number of queries
> using joins?

A UNION might be more appropriate, but that may or may not be any
faster for the DB, and would require all the SELECT x, y, z lists to
"match up" in data type...

Note that MySQL may or may not do a UNION in parallel -- You'd have to
ask MySQL folks.

Come to think of it...

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.

Try writing three different dirt-simple scripts and ab them versus one
script with three queries with ab and see if it really helps.

> If you're inserting data, look into MySQL's INSERT DELAYED syntax.

Definitely.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux