Query time 0.01469
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "60.58"
},
"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": 67,
"rows_produced_per_join": 67,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.98",
"eval_cost": "6.70",
"prefix_cost": "13.68",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (88029,88018,88021,88006,88013,88015,87972,88091,88055,88085,90327,88071,88076,88090,87944,88072,88154,87874,87880,87873,90317,90319,90320,88087,87960,88030,88086,88019,87992,88001))"
}
},
{
"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": 67,
"filtered": "100.00",
"cost_info": {
"read_cost": "16.75",
"eval_cost": "6.70",
"prefix_cost": "37.13",
"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": "16.75",
"eval_cost": "0.34",
"prefix_cost": "60.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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 87873 |
7346,7241,7309,7208M |
|
| 87874 |
7208M,7346,7309,7241 |
|
| 87880 |
7309,7241,7208M,7346 |
|
| 87944 |
7320,7260M |
|
| 87960 |
7349,7261M |
|
| 87972 |
7320,7260M |
|
| 87992 |
7261M,7349 |
|
| 88001 |
7261M,7349 |
|
| 88006 |
7320,7260M |
|
| 88013 |
7260M,7320 |
|
| 88015 |
7260M,7320 |
|
| 88018 |
7260M,7320 |
|
| 88019 |
7261M,7349 |
|
| 88021 |
7260M,7320 |
|
| 88029 |
7259M,7347,7345 |
|
| 88030 |
7349,7261M |
|
| 88055 |
7261M,7349 |
|
| 88071 |
7261M,7349 |
|
| 88072 |
7261M,7349 |
|
| 88076 |
7261M,7349 |
|
| 88085 |
7349,7261M |
|
| 88086 |
7256M,7262 |
|
| 88087 |
7256M,7262 |
|
| 88090 |
7256M,7262 |
|
| 88091 |
7262,7256M |
|
| 88154 |
7320,7260M |
|
| 90317 |
7247M,7265 |
|
| 90319 |
7265,7247M |
|
| 90320 |
7265,7247M |
|
| 90327 |
7247M,7265 |
|