Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "37.74"
},
"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": 66,
"rows_produced_per_join": 66,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.88",
"eval_cost": "6.60",
"prefix_cost": "13.48",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (94587,94588,94827,94828,94829,94830,94831,94839,94840,94841,94843,94850,94851,94852,94853,95309,95315,95316,95318,95319,95365,95366,95367,95368,95369,95370,95371,95372,95373,95374))"
}
},
{
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "16.50",
"eval_cost": "0.33",
"prefix_cost": "36.58",
"data_read_per_join": "8K"
},
"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')))"
}
},
{
"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": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.83",
"eval_cost": "0.33",
"prefix_cost": "37.74",
"data_read_per_join": "52"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 94587 |
7241,7309,7346,7208M |
|
| 94588 |
7241,7309,7346,7208M |
|
| 94827 |
7262,7256M |
|
| 94828 |
7262,7256M |
|
| 94829 |
7262,7256M |
|
| 94830 |
7262,7256M |
|
| 94831 |
7262,7256M |
|
| 94839 |
7265,7247M |
|
| 94840 |
7265,7247M |
|
| 94841 |
7265,7247M |
|
| 94843 |
7345,7347,7259M |
|
| 94850 |
7345,7347,7259M |
|
| 94851 |
7258M |
|
| 94852 |
7345,7347,7259M |
|
| 94853 |
7320,7260M |
|
| 95309 |
7345,7347,7259M |
|
| 95315 |
7258M |
|
| 95316 |
7345,7347,7259M |
|
| 95318 |
7258M |
|
| 95319 |
7265,7247M |
|
| 95365 |
7265,7247M |
|
| 95366 |
7265,7247M |
|
| 95367 |
7265,7247M |
|
| 95368 |
7265,7247M |
|
| 95369 |
7265,7247M |
|
| 95370 |
7265,7247M |
|
| 95371 |
7265,7247M |
|
| 95372 |
7265,7247M |
|
| 95373 |
7265,7247M |
|
| 95374 |
7265,7247M |
|