Query time 0.00066
JSON explain
{
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "c",
"access_type": "index",
"possible_keys": ["PRIMARY", "p_category_id"],
"key": "p_category_id",
"key_length": "773",
"used_key_parts": ["category_id", "usergroup_ids", "status"],
"rows": 11,
"filtered": 100,
"attached_condition": "c.`status` = 0",
"using_index": true
}
},
{
"table": {
"table_name": "pc",
"access_type": "ref",
"possible_keys": ["PRIMARY", "pt"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["category_id"],
"ref": ["demov2026.c.category_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "pc.category_id in (318,303,306,315,314)",
"using_index": true
}
},
{
"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": ["demov2026.pc.product_id"],
"rows": 1,
"filtered": 98.11320496,
"attached_condition": "p.parent_product_id = 0 and p.`status` = 'A'"
}
}
]
}
}
Result
| product_id |
| 291 |
| 292 |
| 293 |
| 294 |
| 295 |
| 296 |
| 297 |
| 298 |
| 299 |
| 300 |
| 301 |
| 302 |
| 303 |
| 304 |
| 305 |
| 306 |
| 307 |
| 308 |
| 309 |
| 310 |
| 311 |
| 312 |
| 313 |
| 314 |
| 315 |
| 316 |
| 317 |
| 318 |
| 319 |
| 320 |
| 321 |
| 328 |
| 343 |
| 344 |
| 330 |
| 331 |
| 332 |
| 333 |
| 334 |
| 335 |
| 347 |
| 338 |
| 339 |
| 340 |
| 341 |
| 342 |