Query time 0.00116
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "34.47"
},
"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": 38,
"rows_produced_per_join": 38,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "4.07",
"eval_cost": "3.80",
"prefix_cost": "7.87",
"data_read_per_join": "608"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (85950,85951,85948,85909,84692,85910,85911,84957,85906,85907,84852,84751,87975,85908,84753,84860,84863,92922,92923,92924,92925,92926,92927,92928,92929,92930,92931,92932,92933))"
}
},
{
"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": 38,
"filtered": "100.00",
"cost_info": {
"read_cost": "9.50",
"eval_cost": "3.80",
"prefix_cost": "21.17",
"data_read_per_join": "608"
},
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "9.50",
"eval_cost": "0.19",
"prefix_cost": "34.47",
"data_read_per_join": "4K"
},
"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 |
| 84692 |
7323M |
|
| 84751 |
7323M |
|
| 84753 |
7323M |
|
| 84852 |
7323M |
|
| 84860 |
7323M |
|
| 84863 |
7323M |
|
| 84957 |
7323M |
|
| 85906 |
7322,7327M |
0 |
| 85907 |
7322,7327M |
0 |
| 85908 |
7322,7327M |
0 |
| 85909 |
7322,7327M |
0 |
| 85910 |
7322,7327M |
0 |
| 85911 |
7322,7327M |
0 |
| 85948 |
7322,7327M |
0 |
| 85950 |
7322,7327M |
0 |
| 85951 |
7322,7327M |
0 |
| 87975 |
7323M |
|
| 92922 |
7322M |
0 |
| 92923 |
7322M |
0 |
| 92924 |
7322M |
0 |
| 92925 |
7322M |
0 |
| 92926 |
7322M |
0 |
| 92927 |
7322M |
0 |
| 92928 |
7322M |
0 |
| 92929 |
7322M |
0 |
| 92930 |
7322M |
0 |
| 92931 |
7322M |
0 |
| 92932 |
7322M |
0 |
| 92933 |
7322M |
0 |