Query time 0.00102
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.77"
},
"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": 96,
"rows_produced_per_join": 96,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.89",
"eval_cost": "9.60",
"prefix_cost": "19.49",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (85654,84105,83099,92839,92897,92898,92900,92903,92904,92907,92908,92911,92912,92935,92937,92939,92941,92943,92945,93054,93055,93056,93057,93058,93059,93060,93061,93070,93281,93524,93526,93528,93782,93784,93786,94027,94029,94031,94033,94075,94717,94720,94721,94724,94725,94726,94729,94730,94733,94734,94737,94738,94741,94742,94745,94746,94749,96304,96308,96310,96311,96313,96314,96316,96318,96319,96321,96323,96325,96327,96329,96331,96333,96337,97015,97017,97024,97027,97028,97029,97031,97033,97040,97046,97841,97844,97845,97848,97849,97850,97853,97854,97857,97858,97861,97862))"
}
},
{
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.00",
"eval_cost": "0.48",
"prefix_cost": "53.09",
"data_read_per_join": "12K"
},
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.20",
"eval_cost": "0.48",
"prefix_cost": "54.77",
"data_read_per_join": "76"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83099 |
7185M |
0 |
| 84105 |
7185M |
0 |
| 85654 |
7185M |
0 |
| 92839 |
7185M |
0 |
| 92897 |
7185M |
0 |
| 92898 |
7185M |
0 |
| 92900 |
7185M |
0 |
| 92903 |
7185M |
0 |
| 92904 |
7185M |
0 |
| 92907 |
7185M |
0 |
| 92908 |
7185M |
0 |
| 92911 |
7185M |
0 |
| 92912 |
7185M |
0 |
| 92935 |
7185M |
0 |
| 92937 |
7185M |
0 |
| 92939 |
7185M |
0 |
| 92941 |
7185M |
0 |
| 92943 |
7185M |
0 |
| 92945 |
7185M |
0 |
| 93054 |
7185M |
0 |
| 93055 |
7185M |
0 |
| 93056 |
7185M |
0 |
| 93057 |
7185M |
0 |
| 93058 |
7185M |
0 |
| 93059 |
7185M |
0 |
| 93060 |
7185M |
0 |
| 93061 |
7185M |
0 |
| 93070 |
7185M |
0 |
| 93281 |
7185M |
0 |
| 93524 |
7185M |
0 |
| 93526 |
7185M |
0 |
| 93528 |
7185M |
0 |
| 93782 |
7185M |
0 |
| 93784 |
7185M |
0 |
| 93786 |
7185M |
0 |
| 94027 |
7185M |
0 |
| 94029 |
7185M |
0 |
| 94031 |
7185M |
0 |
| 94033 |
7185M |
0 |
| 94075 |
7185M |
0 |
| 94717 |
7185M |
0 |
| 94720 |
7185M |
0 |
| 94721 |
7185M |
0 |
| 94724 |
7185M |
0 |
| 94725 |
7185M |
0 |
| 94726 |
7185M |
0 |
| 94729 |
7185M |
0 |
| 94730 |
7185M |
0 |
| 94733 |
7185M |
0 |
| 94734 |
7185M |
0 |
| 94737 |
7185M |
0 |
| 94738 |
7185M |
0 |
| 94741 |
7185M |
0 |
| 94742 |
7185M |
0 |
| 94745 |
7185M |
0 |
| 94746 |
7185M |
0 |
| 94749 |
7185M |
0 |
| 96304 |
7185M |
0 |
| 96308 |
7185M |
0 |
| 96310 |
7185M |
0 |
| 96311 |
7185M |
0 |
| 96313 |
7185M |
0 |
| 96314 |
7185M |
0 |
| 96316 |
7185M |
0 |
| 96318 |
7185M |
0 |
| 96319 |
7185M |
0 |
| 96321 |
7185M |
0 |
| 96323 |
7185M |
0 |
| 96325 |
7185M |
0 |
| 96327 |
7185M |
0 |
| 96329 |
7185M |
0 |
| 96331 |
7185M |
0 |
| 96333 |
7185M |
0 |
| 96337 |
7185M |
0 |
| 97015 |
7185M |
0 |
| 97017 |
7185M |
0 |
| 97024 |
7185M |
0 |
| 97027 |
7185M |
0 |
| 97028 |
7185M |
0 |
| 97029 |
7185M |
0 |
| 97031 |
7185M |
0 |
| 97033 |
7185M |
0 |
| 97040 |
7185M |
0 |
| 97046 |
7185M |
0 |
| 97841 |
7185M |
0 |
| 97844 |
7185M |
0 |
| 97845 |
7185M |
0 |
| 97848 |
7185M |
0 |
| 97849 |
7185M |
0 |
| 97850 |
7185M |
0 |
| 97853 |
7185M |
0 |
| 97854 |
7185M |
0 |
| 97857 |
7185M |
0 |
| 97858 |
7185M |
0 |
| 97861 |
7185M |
0 |
| 97862 |
7185M |
0 |