Query time 0.01168
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "65.99"
},
"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": 73,
"rows_produced_per_join": 73,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.59",
"eval_cost": "7.30",
"prefix_cost": "14.89",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (89297,82417,86852,89362,89364,91921,91922,91923,91924,91925,91926,91927,91929,91930,91931,91932,91933,91934,91935,89378,82371,89433,89434,89296,89391,89393,89406,89408,89407,90843))"
}
},
{
"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": 73,
"filtered": "100.00",
"cost_info": {
"read_cost": "18.25",
"eval_cost": "7.30",
"prefix_cost": "40.44",
"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": "18.25",
"eval_cost": "0.37",
"prefix_cost": "65.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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82371 |
7160M,7305 |
|
| 82417 |
7147M |
|
| 86852 |
7147M |
|
| 89296 |
7324,7154M,7143,7153,7325 |
0 |
| 89297 |
7143,7325,7154M,7324,7153 |
0 |
| 89362 |
7325,7154M,7143,7324,7153 |
0 |
| 89364 |
7325,7154M,7153,7143,7324 |
0 |
| 89378 |
7153,7143,7154M |
0 |
| 89391 |
7325,7324,7153,7143,7154M |
0 |
| 89393 |
7143,7153,7154M,7324,7325 |
0 |
| 89406 |
7325,7153,7324,7154M,7143 |
0 |
| 89407 |
7324,7153,7143,7325,7154M |
0 |
| 89408 |
7154M,7324,7143,7325,7153 |
0 |
| 89433 |
7147M |
|
| 89434 |
7145M |
|
| 90843 |
7325,7153,7143,7324,7154M |
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 |
|