Query time 0.00032
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "13.65"
},
"nested_loop": [
{
"table": {
"table_name": "d",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"object_id"
],
"key": "object_id",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "6",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 0,
"filtered": "20.00",
"cost_info": {
"read_cost": "0.75",
"eval_cost": "0.06",
"prefix_cost": "1.05",
"data_read_per_join": "14"
},
"used_columns": [
"thread_id",
"object_id",
"object_type",
"type"
],
"attached_condition": "(`primapearl_r_new`.`d`.`type` in ('B','R'))"
}
},
{
"table": {
"table_name": "dp",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"thread_id",
"thread_id_2"
],
"key": "thread_id_2",
"used_key_parts": [
"thread_id",
"status"
],
"key_length": "6",
"ref": [
"primapearl_r_new.d.thread_id",
"const"
],
"rows_examined_per_scan": 30,
"rows_produced_per_join": 18,
"filtered": "100.00",
"cost_info": {
"read_cost": "4.50",
"eval_cost": "1.80",
"prefix_cost": "7.35",
"data_read_per_join": "7K"
},
"used_columns": [
"post_id",
"thread_id",
"status"
],
"attached_condition": "(`primapearl_r_new`.`dp`.`post_id` is not null)"
}
},
{
"table": {
"table_name": "dr",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"post_id"
],
"key_length": "3",
"ref": [
"primapearl_r_new.dp.post_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "33.33",
"cost_info": {
"read_cost": "4.50",
"eval_cost": "0.60",
"prefix_cost": "13.65",
"data_read_per_join": "95"
},
"used_columns": [
"rating_value",
"post_id"
],
"attached_condition": "(`primapearl_r_new`.`dr`.`rating_value` > 0)"
}
}
]
}
}
Result
| AVG (dr.rating_value) |
|