Track database name in anemometer queries Hello i have installed anemometer on our server in order to see the queries that need optimization.

From the website hosted a few have a wordpress blog on them so it is hard to guess witch one is affecting the most in the query bellow:

select  wp_posts.*
    from  wp_posts
    inner join  wp_postmeta on ( wp_posts.id = wp_postmeta.post_id )
    where  ?=?
      and  ( ( wp_postmeta.meta_key = ?
               and  cast(wp_postmeta.meta_value as char) = ? ) 
           )
      and  wp_posts.post_type = ?
      and  ((wp_posts.post_status = ?))
    group by  wp_posts.id
    order by  wp_posts.post_date desc 


Is there a way to track the database as well in anemometer?
(Until I get answers to my comment, here is all I can suggest...)

1. LEFT and the two tests on wp_postmeta have no impact on the outcome; get rid of them.


Get rid of wp_postmeta all together.  And get rid of the GROUP BY, which was probably a byproduct of the JOIN.
INDEX(post_type, post_status, post_date)


That leaves you with just

select  *
    from  wp_posts
    where  post_type = ?
      and  post_status = ?
    order by  post_date desc 


Does that give you the right answer?