Query time 0.00130
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "21.61"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "0.29"
},
"nested_loop": [
{
"table": {
"table_name": "dp",
"access_type": "ALL",
"possible_keys": [
"thread_id",
"thread_id_2"
],
"rows_examined_per_scan": 57,
"rows_produced_per_join": 5,
"filtered": "10.00",
"cost_info": {
"read_cost": "13.01",
"eval_cost": "1.14",
"prefix_cost": "14.15",
"data_read_per_join": "2K"
},
"used_columns": [
"post_id",
"thread_id",
"status"
],
"attached_condition": "(`portal`.`dp`.`status` = 'A')"
}
},
{
"table": {
"table_name": "q_discussion",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"object_id"
],
"key": "PRIMARY",
"used_key_parts": [
"thread_id"
],
"key_length": "3",
"ref": [
"portal.dp.thread_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "5.70",
"eval_cost": "0.06",
"prefix_cost": "20.99",
"data_read_per_join": "4"
},
"used_columns": [
"thread_id",
"object_id",
"object_type"
],
"attached_condition": "((`portal`.`q_discussion`.`object_id` in (47678,47679,47680,47681,47682,47683,47684,47685,47686,47688,47690,47691,47692,47693,47694,47695,47696,47697,47698,47699,47700,47701,47702,47703,47705,47706,47707,47708,47709,47710,47711,47712,47714,47719,47720,47721,47722,47725,47730,47731,47732,47733,47734,47735,47736,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47747,47748,47749,47750,47751,47752,47753,47754,47755,47756,47757,47758,47760,47761,47762,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,45784,45785,45786,45787,45788,45789,45790,45791,45792,45793,45794,45795,45796,45797,45798,45799,45800,45801,45802,45803,45804,45805,45806,45807,45808,45809,45810,45811,45812,45813,45814,45815,45816,45817,45818,45819,45820,45821,45822,45823,45824,45825,45826,45827,45828,45829)) and (`portal`.`q_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": [
"portal.q_discussion.object_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.29",
"eval_cost": "0.06",
"prefix_cost": "21.33",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id"
]
}
}
]
}
}
}