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

From: Date: Thu, 31 Jan 2008 01:39:13 +0000
Subject: Re: how dod you get to do multiple mysql queries concurrently?
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-268403@lists.php.net to get a copy of this message
On Mon, January 28, 2008 12:37 pm, Per Jessen wrote: > Richard Lynch wrote: > >> On Sat, January 26, 2008 3:45 am, Per Jessen wrote: >>> Nathan Rixham wrote: >>> >>>>Back on the mysql side of things, try using geometry columns rather >>>>than numerical primary keys, with spatial indexes.. it's a MASSIVE >>>>performance upgrade (I've cut 5 second queries down to 0.005 by >>>> using >>>>geo columns) >>> >>> Uh, could you could elaborate a bit on that (whilst I go and do >>> some >>> googling)? >> >> If you are doing geography/geometry stuff, spatial indices can be >> nice. >> > > OK, what is a 'geometry column' and what is a 'spatial index' ? Imagine a single column combining both longitude and latitude. Now imagine an index that "knows" about long/lat, and keeps geographically "close" objects sorted in the index for you. Including "knowing" about the 180 <-> -180 degree wrap-around. (Or 360 === 0 wrap-around in the other geo-system.) So when you ask for "theme parks near Zurich" your DB can answer in milliseconds instead of minutes. It's a bit more complex than that, as a "geometry" can be much more than just long/lat, and space could be 3-D or even N-space, but that's the simple version to light up the bulb. -- 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 (#268403) next »