Query time 0.00143
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "42.28"
},
"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": 74,
"rows_produced_per_join": 74,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.69",
"eval_cost": "7.40",
"prefix_cost": "15.09",
"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,88799,88006,88013,88015,87972,88091,88055,88085,88703,88750,87809,87811,87814,87817,87824,90327,88071,88076,88090,87944,88595,88072,88154,87808,87810,87813,87816))"
}
},
{
"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": "18.50",
"eval_cost": "0.37",
"prefix_cost": "40.99",
"data_read_per_join": "9K"
},
"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.93",
"eval_cost": "0.37",
"prefix_cost": "42.28",
"data_read_per_join": "59"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 87808 |
7210,7307,7308M |
0 |
| 87809 |
7210,7307,7308M |
0 |
| 87810 |
7210,7307,7308M |
0 |
| 87811 |
7210,7307,7308M |
0 |
| 87813 |
7210,7307,7308M |
0 |
| 87814 |
7210,7307,7308M |
0 |
| 87816 |
7210,7307,7308M |
0 |
| 87817 |
7210,7307,7308M |
0 |
| 87824 |
7210,7307,7308M |
0 |
| 87944 |
7320,7260M |
|
| 87972 |
7320,7260M |
|
| 88006 |
7320,7260M |
|
| 88013 |
7320,7260M |
|
| 88015 |
7320,7260M |
|
| 88018 |
7320,7260M |
|
| 88021 |
7320,7260M |
|
| 88029 |
7345,7347,7259M |
|
| 88055 |
7349,7261M |
|
| 88071 |
7349,7261M |
|
| 88072 |
7349,7261M |
|
| 88076 |
7349,7261M |
|
| 88085 |
7349,7261M |
|
| 88090 |
7262,7256M |
|
| 88091 |
7262,7256M |
|
| 88154 |
7320,7260M |
|
| 88595 |
7210,7211,7282M |
0 |
| 88703 |
7210,7211,7282M |
0 |
| 88750 |
7210,7211,7282M |
0 |
| 88799 |
7210,7211,7282M |
0 |
| 90327 |
7265,7247M |
|