Query time 0.00153
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "46.26"
},
"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": 81,
"rows_produced_per_join": 81,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.39",
"eval_cost": "8.10",
"prefix_cost": "16.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 (87823,87874,87779,87783,87793,87799,87880,87873,90317,90319,90320,88087,88797,87960,87778,87782,87791,87797,87760,88701,88748,88596,88030,88086,87759,88019,87992,88001,88005,87939))"
}
},
{
"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": "20.25",
"eval_cost": "0.41",
"prefix_cost": "44.84",
"data_read_per_join": "10K"
},
"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.01",
"eval_cost": "0.41",
"prefix_cost": "46.26",
"data_read_per_join": "64"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 87759 |
7210,7307,7308M |
0 |
| 87760 |
7210,7307,7308M |
0 |
| 87778 |
7210,7307,7308M |
0 |
| 87779 |
7210,7307,7308M |
0 |
| 87782 |
7210,7211,7321M |
0 |
| 87783 |
7210,7211,7321M |
0 |
| 87791 |
7210,7307,7308M |
0 |
| 87793 |
7210,7307,7308M |
0 |
| 87797 |
7210,7307,7308M |
0 |
| 87799 |
7210,7307,7308M |
0 |
| 87823 |
7210,7307,7308M |
0 |
| 87873 |
7241,7309,7346,7208M |
|
| 87874 |
7241,7309,7346,7208M |
|
| 87880 |
7241,7309,7346,7208M |
|
| 87939 |
7349,7261M |
|
| 87960 |
7349,7261M |
|
| 87992 |
7349,7261M |
|
| 88001 |
7349,7261M |
|
| 88005 |
7349,7261M |
|
| 88019 |
7349,7261M |
|
| 88030 |
7349,7261M |
|
| 88086 |
7262,7256M |
|
| 88087 |
7262,7256M |
|
| 88596 |
7210,7211,7282M |
0 |
| 88701 |
7210,7211,7282M |
0 |
| 88748 |
7210,7211,7282M |
0 |
| 88797 |
7210,7211,7282M |
0 |
| 90317 |
7265,7247M |
|
| 90319 |
7265,7247M |
|
| 90320 |
7265,7247M |
|