{
"query_block": {
"select_id": 1,
"cost": 0.010583984,
"nested_loop": [
{
"read_sorted_file": {
"filesort": {
"sort_key": "tmall_discussion_posts.`timestamp` desc",
"table": {
"table_name": "tmall_discussion_posts",
"access_type": "ref",
"possible_keys": ["thread_id", "thread_id_2"],
"key": "thread_id",
"key_length": "3",
"used_key_parts": ["thread_id"],
"ref": ["const"],
"loops": 1,
"rows": 2,
"cost": 0.00325828,
"filtered": 100,
"attached_condition": "tmall_discussion_posts.thread_id <=> 2 and tmall_discussion_posts.`status` = 'A'"
}
}
}
},
{
"table": {
"table_name": "tmall_discussion_messages",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["post_id"],
"ref": ["tmall.tmall_discussion_posts.post_id"],
"loops": 2,
"rows": 1,
"cost": 0.003662852,
"filtered": 100
}
},
{
"table": {
"table_name": "tmall_discussion_rating",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["post_id"],
"ref": ["tmall.tmall_discussion_posts.post_id"],
"loops": 2,
"rows": 1,
"cost": 0.003662852,
"filtered": 100
}
}
]
}
}
| post_id | thread_id | name | timestamp | user_id | ip_address | status | message | rating_value |
|---|---|---|---|---|---|---|---|---|
| 4 | 2 | Guest | 1129558457 | 0 | 192.168.0.2 | A | I do not like. At all. | 2 |
| 3 | 2 | Admin Admin | 1129558427 | 1 | 192.168.0.2 | A | Just a perfect product! | 5 |