title: MySQL basic query taking exceptionally long - explain plan looks pretty good
body: <p>I have a query with the explain plan below.  It's pretty basic, every join is using an index (though not unique), and it's taking 5+ hours.  The largest table has about 100k records.  RAM and CPU are not pegged or anything, no other queries running, no table locks.  The most "complicated" part I have is the coalesce in an outer join.  Is that killing me?</p>
  
  <p>For clarification, I'm joining to the same table twice because some of the records have a user ID, some just have a first/last name. I prefer to join by a unique user name obviously, and one of the selected items is coalesce(u1.job_title, u2.job_title) </p>
  
  <pre><code>from utilization_incident ui
  
  left join users_utilization_v u1
         on  u1.cc_user_id = ui.assigned_to_user_id
         and u1.source_system = ui.source
         and u1.data_date = ui.data_date
  left join users_utilization_v u2
         on  u2.first_name = ui.assigned_to_first_name
         and u2.last_name = ui.assigned_to_last_name
         and u2.source_system = ui.source
         and u2.data_date = ui.data_date
  
  left join lkp_job_title_service_area jtsa
         on  jtsa.job_title = coalesce(u1.job_title, u2.job_title)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UiA5r.png" rel="nofollow"><img src="https://i.stack.imgur.com/UiA5r.png" alt="enter image description here"></a></p>