Slow query execution time

Posted by rotor on Stack Overflow See other posts from Stack Overflow or by rotor
Published on 2012-03-21T05:24:20Z Indexed on 2012/03/21 5:29 UTC
Read the original article Hit count: 106

Filed under:
select p.id,p.title,p.slug,p.content,
  (select url from gallery
   where postid=p.id limit 1) as url,
t.name
from posts as p
inner join termrel as tr on (tr.object = p.id)
inner join termtax as tx on (tx.id = tr.termtax_id)
inner join terms as t on (t.id = tx.term_id)
where tx.taxonomy_id=3 and p.post_status is null
order by t.name asc

This query took about 0.2407s to execute. How to make it fast?

© Stack Overflow or respective owner

Related posts about query