Query time 0.01784
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "63.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": 70,
"rows_produced_per_join": 70,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.29",
"eval_cost": "7.00",
"prefix_cost": "14.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (89332,89294,89405,89309,89321,89257,89323,89322,89325,86816,89306,89324,89366,89305,89317,89307,89319,89326,89312,89345,89318,89347,89346,89255,89348,89261,89314,89320,89260,89315))"
}
},
{
"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": 70,
"filtered": "100.00",
"cost_info": {
"read_cost": "17.50",
"eval_cost": "7.00",
"prefix_cost": "38.79",
"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": "17.50",
"eval_cost": "0.35",
"prefix_cost": "63.29",
"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 |
| 86816 |
7326M |
|
| 89255 |
7325,7143,7324,7153,7154M |
0 |
| 89257 |
7143,7325,7324,7153,7154M |
0 |
| 89260 |
7154M,7325,7324,7143,7153 |
0 |
| 89261 |
7325,7143,7153,7154M,7324 |
0 |
| 89294 |
7325,7143,7154M,7324,7153 |
0 |
| 89305 |
7326M |
|
| 89306 |
7326M |
|
| 89307 |
7326M |
|
| 89309 |
7326M |
|
| 89312 |
7326M |
|
| 89314 |
7326M |
|
| 89315 |
7326M |
|
| 89317 |
7326M |
|
| 89318 |
7326M |
|
| 89319 |
7326M |
|
| 89320 |
7326M |
|
| 89321 |
7326M |
|
| 89322 |
7326M |
|
| 89323 |
7326M |
|
| 89324 |
7326M |
|
| 89325 |
7326M |
|
| 89326 |
7326M |
|
| 89332 |
7326M |
|
| 89345 |
7324,7325,7143,7153,7154M |
0 |
| 89346 |
7325,7143,7153,7154M,7324 |
0 |
| 89347 |
7154M,7324,7325,7153,7143 |
0 |
| 89348 |
7154M,7324,7153,7325,7143 |
0 |
| 89366 |
7326M |
|
| 89405 |
7143,7325,7324,7153,7154M |
0 |