Query time 0.00062
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.55"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "0.13"
},
"nested_loop": [
{
"table": {
"table_name": "dp",
"access_type": "ALL",
"possible_keys": [
"thread_id",
"thread_id_2"
],
"rows_examined_per_scan": 25,
"rows_produced_per_join": 2,
"filtered": "10.00",
"cost_info": {
"read_cost": "6.78",
"eval_cost": "0.50",
"prefix_cost": "7.28",
"data_read_per_join": "1K"
},
"used_columns": [
"post_id",
"thread_id",
"status"
],
"attached_condition": "(`jmj_test`.`dp`.`status` = 'A')"
}
},
{
"table": {
"table_name": "jmj_discussion",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"object_id"
],
"key": "PRIMARY",
"used_key_parts": [
"thread_id"
],
"key_length": "3",
"ref": [
"jmj_test.dp.thread_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "2.50",
"eval_cost": "0.03",
"prefix_cost": "10.28",
"data_read_per_join": "3"
},
"used_columns": [
"thread_id",
"object_id",
"object_type"
],
"attached_condition": "((`jmj_test`.`jmj_discussion`.`object_id` in (1678,1539,1536,915,914,913,912,911,797,796)) and (`jmj_test`.`jmj_discussion`.`object_type` = 'P'))"
}
},
{
"table": {
"table_name": "p",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"jmj_test.jmj_discussion.object_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.13",
"eval_cost": "0.03",
"prefix_cost": "10.43",
"data_read_per_join": "606"
},
"used_columns": [
"product_id"
]
}
}
]
}
}
}