Query time 0.00025
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "p.product_id",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "dp",
"access_type": "ALL",
"possible_keys": ["thread_id", "thread_id_2"],
"rows": 17,
"filtered": 100,
"attached_condition": "dp.`status` = 'A'"
}
},
{
"table": {
"table_name": "vi_discussion",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "object_id", "idx_company_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["thread_id"],
"ref": ["devvipiriscom.dp.thread_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "vi_discussion.company_id = 1 and vi_discussion.object_type = 'P'"
}
},
{
"table": {
"table_name": "p",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["devvipiriscom.vi_discussion.object_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "p.product_id in (12,148,5,23,1,149,79,238,239,172,167,280,282,278,8,150,13)",
"using_index": true
}
}
]
}
}
}
}
Result
| product_id |
discussion_amount_posts |
| 1 |
1 |
| 5 |
1 |
| 8 |
1 |
| 23 |
1 |
| 167 |
1 |
| 172 |
1 |
| 238 |
1 |
| 239 |
1 |