I have a large table containing some 15 million row, all varchar data. I ran a self join query on it which has a 3 self table join, something like this:
SELECT sj1.uid FROM tbl sj1
JOIN tbl sj2 ON sj1.uid = sj2.uid
JOIN tbl sj3 ON sj1.uid = sj3.uid
WHERE sj1.product_code = 'tb'
AND sj2.product_code = 'im'
AND sj3.product_code = 'mg'
Now it’s been over 2 hours and when I check show full processlist I get status sending data and nothing else. I would like to know if there’s any way to know how many rows have been processed by this query or any other relevant status. I can’t even kill this query with a doubt that it might be nearing its end and if interrupted it will be a big waste of resource. Any help with this?
This is the what EXPLAIN explained me:
+----+-------------+-------+------+-------------------+-------------------+---------+----------------------------------------+----------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+-------------------+-------------------+---------+----------------------------------------+----------+-------------+
| 1 | SIMPLE | a | ALL | ix_unique_user_id | NULL | NULL | NULL | 14251264 | Using where |
| 1 | SIMPLE | b | ref | ix_unique_user_id | ix_unique_user_id | 103 | ph_usertrack_analysis.a.unique_user_id | 2 | Using where |
| 1 | SIMPLE | c | ref | ix_unique_user_id | ix_unique_user_id | 103 | ph_usertrack_analysis.a.unique_user_id | 2 | Using where |
+----+-------------+-------+------+-------------------+-------------------+---------+----------------------------------------+----------+-------------+
So index on unique_user_id is being used
No, you cannot get any information on query progress out of MySQL.