@LeanneS was trying to merge two contact records, and it wasn't working. This SQL was running for half an hour before we killed it
INSERT IGNORE INTO civicrm_temp_civireport_logsummary SELECT entity_log_civireport.id as log_civicrm_entity_id, 1, entity_log_civireport.log_action as log_civicrm_entity_log_action, 'log_civicrm_contact' as log_civicrm_entity_log_type, entity_log_civireport.log_user_id as log_civicrm_entity_log_user_id, entity_log_civireport.log_date as log_civicrm_entity_log_date, modified_contact_civireport.display_name as log_civicrm_entity_altered_contact, modified_contact_civireport.id as log_civicrm_entity_altered_contact_id, entity_log_civireport.log_conn_id as log_civicrm_entity_log_conn_id, modified_contact_civireport.is_deleted as log_civicrm_entity_is_deleted, altered_by_contact_civireport.display_name as altered_by_contact_display_name FROM `civicrm`.log_civicrm_contact entity_log_civireport INNER JOIN civicrm_contact modified_contact_civireport ON (entity_log_civireport.id = modified_contact_civireport.id ) LEFT JOIN civicrm_contact altered_by_contact_civireport ON (entity_log_civireport.log_user_id = altered_by_contact_civireport.id) WHERE ( 1 ) AND (entity_log_civireport.log_action != 'Initialization') GROUP BY entity_log_civireport.log_conn_id, entity_log_civireport.log_user_id, EXTRACT(DAY_MICROSECOND FROM entity_log_civireport.log_date), entity_log_civireport.id ORDER BY entity_log_civireport.log_date DESC