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

From: Date: Fri, 25 Jan 2008 18:30:23 +0000
Subject: RE: [PHP] Re: how dod you get to do multiple mysql queries concurrently?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-268120@lists.php.net to get a copy of this message
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?

« previous php.general (#268120) next »