+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ANALYZE | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_optimization": { "r_total_time_ms": 2.843296051 }, "query_block": { "select_id": 1, "cost": 72055.92198, "r_loops": 1, "r_total_time_ms": 37.3112483, "nested_loop": [ { "table": { "table_name": "OUTR2", "access_type": "ALL", "possible_keys": ["PRIMARY"], "loops": 1, "r_loops": 1, "rows": 70, "r_rows": 70, "cost": 1000.04019, "r_table_time_ms": 0.041046723, "r_other_time_ms": 14.25893149, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } }, { "table": { "table_name": "OUTR1", "access_type": "ALL", "loops": 70, "r_loops": 70, "rows": 70, "r_rows": 70, "cost": 70002.81328, "r_table_time_ms": 4.614504668, "r_other_time_ms": 13.84384456, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 1.857142857, "attached_condition": "trigcond((OUTR1.col_int_key,(subquery#2))) and trigcond(OUTR1.col_int_nokey = OUTR2.col_int_key)", "r_filtered": 1.857142857 } }, { "range-checked-for-each-record": { "keys": ["k_int"], "r_keys": { "full_scan": 0, "index_merge": 0, "range": { "k_int": 50 } }, "table": { "table_name": "OUTR3", "access_type": "ALL", "possible_keys": ["k_int"], "loops": 4900, "r_loops": 50, "rows": 70, "r_rows": 53.18, "cost": 1053.068509, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } } } ], "subqueries": [ { "query_block": { "union_result": { "table_name": "", "access_type": "ALL", "r_loops": 7, "r_rows": 0.285714286, "query_specifications": [ { "query_block": { "select_id": 2, "cost": 0.031379482, "r_loops": 7, "r_total_time_ms": 1.362745446, "nested_loop": [ { "table": { "table_name": "INNR1", "access_type": "eq_ref", "possible_keys": ["PRIMARY"], "key": "PRIMARY", "key_length": "4", "used_key_parts": ["pk"], "ref": ["func"], "loops": 1, "r_loops": 7, "rows": 1, "r_rows": 1, "cost": 0.031379482, "r_table_time_ms": 1.312431209, "r_other_time_ms": 0.041948716, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 14.28571429, "attached_condition": "INNR1.col_int_nokey <= 1 or INNR1.pk <= 4", "r_filtered": 14.28571429 } } ] } }, { "query_block": { "select_id": 3, "operation": "UNION", "cost": 1000.04019, "r_loops": 7, "r_total_time_ms": 2.186623427, "having_condition": "count(0) >= 2 and NULL = (INNR1.pk)", "temporary_table": { "nested_loop": [ { "table": { "table_name": "INNR1", "access_type": "ALL", "loops": 1, "r_loops": 7, "rows": 70, "r_rows": 70, "cost": 1000.04019, "r_table_time_ms": 0.119213018, "r_other_time_ms": 0.328482183, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } } ] } } } ] } } } ] } } | +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.043 sec) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ANALYZE | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_optimization": { "r_total_time_ms": 3.719600047 }, "query_block": { "select_id": 1, "cost": 102158.8545, "r_loops": 1, "r_total_time_ms": 70.31541471, "nested_loop": [ { "table": { "table_name": "OUTR2", "access_type": "ALL", "possible_keys": ["PRIMARY"], "loops": 1, "r_loops": 1, "rows": 100, "r_rows": 100, "cost": 1000.044253, "r_table_time_ms": 0.040689981, "r_other_time_ms": 24.33118473, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } }, { "table": { "table_name": "OUTR1", "access_type": "ALL", "loops": 100, "r_loops": 100, "rows": 100, "r_rows": 100, "cost": 100004.4253, "r_table_time_ms": 8.675496399, "r_other_time_ms": 28.78975046, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 1.55, "attached_condition": "trigcond((OUTR1.col_int_key,(subquery#2))) and trigcond(OUTR1.col_int_nokey = OUTR2.col_int_key)", "r_filtered": 1.55 } }, { "range-checked-for-each-record": { "keys": ["k_int"], "r_keys": { "full_scan": 0, "index_merge": 0, "range": { "k_int": 96 } }, "table": { "table_name": "OUTR3", "access_type": "ALL", "possible_keys": ["k_int"], "loops": 10000, "r_loops": 96, "rows": 100, "r_rows": 78.09375, "cost": 1154.384913, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } } } ], "subqueries": [ { "query_block": { "union_result": { "table_name": "", "access_type": "ALL", "r_loops": 7, "r_rows": 0.285714286, "query_specifications": [ { "query_block": { "select_id": 2, "cost": 0.031379482, "r_loops": 7, "r_total_time_ms": 2.797640291, "nested_loop": [ { "table": { "table_name": "INNR1", "access_type": "eq_ref", "possible_keys": ["PRIMARY"], "key": "PRIMARY", "key_length": "4", "used_key_parts": ["pk"], "ref": ["func"], "loops": 1, "r_loops": 7, "rows": 1, "r_rows": 1, "cost": 0.031379482, "r_table_time_ms": 2.747318127, "r_other_time_ms": 0.040836654, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 14.28571429, "attached_condition": "INNR1.col_int_nokey <= 1 or INNR1.pk <= 4", "r_filtered": 14.28571429 } } ] } }, { "query_block": { "select_id": 3, "operation": "UNION", "cost": 1000.044253, "r_loops": 7, "r_total_time_ms": 4.286934447, "having_condition": "count(0) >= 2 and NULL = (INNR1.pk)", "temporary_table": { "nested_loop": [ { "table": { "table_name": "INNR1", "access_type": "ALL", "loops": 1, "r_loops": 7, "rows": 100, "r_rows": 100, "cost": 1000.044253, "r_table_time_ms": 0.165714811, "r_other_time_ms": 0.427310099, "r_engine_stats": {}, "filtered": 100, "r_total_filtered": 100, "r_filtered": 100 } } ] } } } ] } } } ] } } | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.078 sec)