Query time 0.01582
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "61.48"
},
"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": 68,
"rows_produced_per_join": 68,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.08",
"eval_cost": "6.80",
"prefix_cost": "13.88",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (91905,91906,91907,91908,91909,91910,91911,84268,89735,91904,89435,82417,86852,91921,91922,91923,91924,91925,91926,91927,91929,91930,91931,91932,91933,91934,91935,89433,89434,89441,82399,86848,82414,86855,84265,89432,89731,89439,82396,86851,89440,82416,86853,89431,84263,84267,83088,89124))"
}
},
{
"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": 68,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.00",
"eval_cost": "6.80",
"prefix_cost": "37.68",
"data_read_per_join": "1K"
},
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "17.00",
"eval_cost": "0.34",
"prefix_cost": "61.48",
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82396 |
7145M |
|
| 82399 |
7147M |
|
| 82414 |
7145M |
|
| 82416 |
7146M |
|
| 82417 |
7147M |
|
| 83088 |
7147M |
|
| 84263 |
7145M |
|
| 84265 |
7147M |
|
| 84267 |
7145M |
|
| 84268 |
7143,7144,7147M |
0 |
| 86848 |
7147M |
|
| 86851 |
7145M |
|
| 86852 |
7147M |
|
| 86853 |
7145M |
|
| 86855 |
7145M |
|
| 89124 |
7147M |
|
| 89431 |
7147M |
|
| 89432 |
7145M |
|
| 89433 |
7147M |
|
| 89434 |
7145M |
|
| 89435 |
7147M |
|
| 89439 |
7145M |
|
| 89440 |
7146M |
|
| 89441 |
7145M |
|
| 89731 |
7147M |
|
| 89735 |
7147M,7144,7143 |
0 |
| 91904 |
7144,7143M,7147 |
0 |
| 91905 |
7144,7143M,7147 |
0 |
| 91906 |
7143M,7147,7144 |
0 |
| 91907 |
7147,7143M,7144 |
0 |
| 91908 |
7147,7143M,7144 |
0 |
| 91909 |
7144,7147,7143M |
0 |
| 91910 |
7143M,7147,7144 |
0 |
| 91911 |
7147,7144,7143M |
0 |
| 91921 |
7146M |
|
| 91922 |
7146M |
|
| 91923 |
7146M |
|
| 91924 |
7146M |
|
| 91925 |
7146M |
|
| 91926 |
7146M |
|
| 91927 |
7146M |
|
| 91929 |
7145M |
|
| 91930 |
7145M |
|
| 91931 |
7145M |
|
| 91932 |
7145M |
|
| 91933 |
7145M |
|
| 91934 |
7145M |
|
| 91935 |
7145M |
|