Query time 0.00128
JSON explain
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "pc",
"access_type": "range",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"rows": 22,
"filtered": 100,
"attached_condition": "pc.category_id in (165,167,168,169,170,171,172,201)",
"using_index": true
},
"table": {
"table_name": "c",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "p_category_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["kigoonlinecs.pc.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "c.`status` = 0"
},
"table": {
"table_name": "p",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "status", "idx_parent_product_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["product_id"],
"ref": ["kigoonlinecs.pc.product_id"],
"rows": 1,
"filtered": 95.62748718,
"attached_condition": "p.parent_product_id = 0 and p.`status` = 'A'"
}
}
}
Result
| product_id |
| 223 |
| 224 |
| 225 |
| 240 |
| 241 |
| 247 |
| 214 |
| 217 |
| 218 |
| 244 |
| 219 |
| 220 |
| 221 |
| 222 |
| 227 |
| 228 |
| 229 |
| 205 |
| 206 |
| 207 |
| 208 |
| 209 |
| 210 |
| 211 |
| 212 |
| 213 |
| 215 |
| 226 |