Slow query execution time
- by rotor
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?