Query time 0.00132
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "39.87"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 44,
"rows_produced_per_join": 44,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "4.68",
"eval_cost": "4.40",
"prefix_cost": "9.08",
"data_read_per_join": "704"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93833,93834,93835,93836,93837,93838,93839,93840,93841,93882,93883,93884,93885,94367,94368,94369,94370,94371,94372,94373,94374,94375,94376,94377,94378,94379,94380,94438,94463,94464))"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 44,
"filtered": "100.00",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "4.40",
"prefix_cost": "24.48",
"data_read_per_join": "704"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "0.22",
"prefix_cost": "39.88",
"data_read_per_join": "5K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 93833 |
7222M |
|
| 93834 |
7330,7285M |
|
| 93835 |
7330,7285M |
|
| 93836 |
7222M |
|
| 93837 |
7222M |
|
| 93838 |
7222M |
|
| 93839 |
7222M |
|
| 93840 |
7222M |
|
| 93841 |
7222M |
|
| 93882 |
7330,7285M |
|
| 93883 |
7330,7285M |
|
| 93884 |
7330,7285M |
|
| 93885 |
7330,7285M |
|
| 94367 |
7252M |
|
| 94368 |
7252M |
|
| 94369 |
7252M |
|
| 94370 |
7252M |
|
| 94371 |
7252M |
|
| 94372 |
7331,7253M |
|
| 94373 |
7331,7253M |
|
| 94374 |
7331,7253M |
|
| 94375 |
7331,7253M |
|
| 94376 |
7331,7253M |
|
| 94377 |
7331,7253M |
|
| 94378 |
7331,7253M |
|
| 94379 |
7331,7253M |
|
| 94380 |
7254M |
|
| 94438 |
7254M |
|
| 94463 |
7254M |
|
| 94464 |
7254M |
|