Query time 0.00326
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "0.79"
},
"ordering_operation": {
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "cscart_discussion_posts",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"thread_id",
"thread_id_2"
],
"key": "thread_id",
"used_key_parts": [
"thread_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "12.50",
"cost_info": {
"read_cost": "0.50",
"eval_cost": "0.03",
"prefix_cost": "0.70",
"data_read_per_join": "112"
},
"used_columns": [
"post_id",
"thread_id",
"name",
"timestamp",
"user_id",
"ip_address",
"status"
],
"attached_condition": "(`s2cart`.`cscart_discussion_posts`.`status` = 'A')"
}
},
{
"table": {
"table_name": "cscart_discussion_messages",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"post_id"
],
"key_length": "3",
"ref": [
"s2cart.cscart_discussion_posts.post_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "87.50",
"cost_info": {
"read_cost": "0.06",
"eval_cost": "0.02",
"prefix_cost": "0.79",
"data_read_per_join": "5"
},
"used_columns": [
"message",
"post_id"
],
"attached_condition": "(`s2cart`.`cscart_discussion_messages`.`message` <> '')"
}
}
]
}
}
}
Result
post_id |
thread_id |
name |
timestamp |
user_id |
ip_address |
status |
message |
124 |
3791 |
Riccky |
1485339960 |
0 |
5f68c2c5 |
A |
You're awesome, guys! Everything you do is great. |
125 |
3791 |
Rudrah |
1485339960 |
0 |
5f68c2c5 |
A |
I would recommend your company to my friends and business associates. The rating would be a 10 |