On Sat, January 26, 2008 3:45 am, Per Jessen wrote:
> Nathan Rixham wrote:
>
>> I posted you a short script on this thread at 04:07 GMT today
>> that'll
>> get you multithreading (via cli) - but even then you can shell exec
>> that cli script from apache..
>
> Yeah, I noticed, thanks.  The thing is - once pcntl_fork() is added to
> the mix, it's getting a little too complicated for what was otherwise
> a
> simple php web-application.  I'm thinking I'm probably better off with
> my iframe-rpc stuff.
>
>>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.

I suspect that massive performance upgrade just came from having what
is essentially a multi-field index, because MySQL can only use *ONE*
index per query.

If your where and/or order by force MySQL to pick among several
possible indices, it can get ugly fast.

If you have an index with all the data it needs for both where and
order by clauses, it will (usually) pick the right one, and have
USEFUL indices, instead of not-so-useful indices.

-- 
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

Reply via email to