[wp-testers] 2.3 and loooooong running queries
Ryan Boren
ryan at boren.nu
Wed Oct 3 07:37:27 GMT 2007
On 10/2/07, Handy <handy.solo at gmail.com> wrote:
> Help me Obi-wan{s), you're my last hope... :-)
>
> I upgraded to 2.3 over the weekend. Seemed to go smoothly enough. I
> imported my UTW tags and went "native" for tagging.
>
> Twice now I've managed to clobber MySQL with endless queries that use up my
> max_user_connections. I'm on shared hosting and my host is not amused...
>
> They sent me a snippet of the query, but it must be one that's
> programmatically built as I sure can't turn anything like it up with grep.
> The query is below for reference (check those joins and the where clause!).
> ...
> 'to' AND term3.slug = 'make' AND term4.slug = 'your' AND term5.slug =
> 'fonts' AND term6.slug = 'smooth' AND term7.slug = 'enough' AND
> term8.slug = 'to' AND term9.slug = 'drool' AND term10.slug = 'over'
> AND post_type = 'post' AND (post_status = 'publish') GROUP BY wp_posts.ID
> ORDER BY post_date DESC LIMIT 5, 5;
That looks like a tag intersection query with 10 tags. That will suck
given how intersections are simulated by equating corresponding
attributes. If anyone knows a better way of doing intersections in
MySQL 4.1, do tell. Maybe we should just post-process a union.
Regardless, WP should only do these queries when tag=foo+bar+baz+...
is requested.
Ryan
More information about the wp-testers
mailing list