title: How to determine cause of slow queries
body: <p>I have a query that is taking around 7 seconds.  I break it into two queries which provides the same data as the first, and it takes around 0.01 seconds.  I had thought that I properly indexed it, however, likely had not.  The database currently has very little data in it.  I am using MySQL 5.5.46.  I am using PHP with PDO, however, I don't think that is relevant, and purposely did not tag this question with PHP or PDO.</p>
  
  <p>I am not asking why my specific query is taking so long or how to identify slow queries, but am asking for the generic steps to determine the cause of a slow query.  I expect that <code>EXPLAIN</code> will be used.  What are you looking for in <code>EXPLAIN</code>?  What other steps could one take?</p>