[wp-hackers] Re: [ slow queries in 1.2
Dougal Campbell
dougal at gunters.org
Fri Nov 19 13:32:41 UTC 2004
Ryan Boren wrote:
> Beyond that, we should fix the query. For huge $posts arrays we could
> skip the post_id_list stuff and just pull every post. Would that be
> faster? Is their a more elegant query we could use?
I haven't tried an actual benchmark, but I would have to believe that if
we detected a post count over a certain threshold, and executed a
different query that just avoided the IN clause, the SQL engine would be
able to optimize the query much better. SQL derives from mathematical
set theory, and when you specify a huge list of conditions which must
all be checked individually (as opposed to a more general condition),
it's bound to slow things down.
--
Ernest MacDougal Campbell III, MCP+I, MCSE <dougal at gunters.org>
http://dougal.gunters.org/ http://spam.gunters.org/
Web Design & Development: http://www.mentalcollective.com/
This message is guaranteed to be 100% eror frea!
More information about the hackers
mailing list