[wp-testers] 2.3 and loooooong running queries

Ryan Boren ryan at boren.nu
Wed Oct 3 19:01:53 GMT 2007


On 10/3/07, Alexander Concha <alex at buayacorp.com> wrote:
> Ryan Boren escribió:
> > On 10/2/07, Handy <handy.solo at gmail.com> wrote:
> >> [...]
> >
> > 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.
>
> Tag intersections can be done using two queries, you can see an example
> for tag_slug__and in http://pastebin.com/m38c901f3.

I forgot about that method.  That is much nicer.  I created a ticket
and attached a patch.

http://trac.wordpress.org/attachment/ticket/5137/intersection.diff#preview

I added an else condition so that we wouldn't fall through to the
regular front page query if no posts matched the tag_slug_and query.

Ryan


More information about the wp-testers mailing list