Query time 0.00090
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "43.98"
},
"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": 77,
"rows_produced_per_join": 77,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.99",
"eval_cost": "7.70",
"prefix_cost": "15.69",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (99058,99059,99060,99061,99062,99063,99064,99065,99067,99077,99078,99081,99082,99110,99111,99112,99113,99114,99115,99116,99117,99118,99119,99120,99121,99122,99123,99124,99125,99126))"
}
},
{
"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": "19.25",
"eval_cost": "0.39",
"prefix_cost": "42.64",
"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": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.96",
"eval_cost": "0.39",
"prefix_cost": "43.99",
"data_read_per_join": "61"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 99058 |
7241,7309,7346,7208M |
|
| 99059 |
7241,7309,7346,7208M |
|
| 99060 |
7241,7309,7346,7208M |
|
| 99061 |
7241,7309,7346,7208M |
|
| 99062 |
7241,7309,7346,7208M |
|
| 99063 |
7241,7309,7346,7208M |
|
| 99064 |
7241,7309,7346,7208M |
|
| 99065 |
7241,7309,7346,7208M |
|
| 99067 |
7241,7309,7346,7208M |
|
| 99077 |
7262,7256M |
|
| 99078 |
7262,7256M |
|
| 99081 |
7262,7256M |
|
| 99082 |
7262,7256M |
|
| 99110 |
7258M |
|
| 99111 |
7345,7347,7259M |
|
| 99112 |
7320,7260M |
|
| 99113 |
7349,7261M |
|
| 99114 |
7262,7256M |
|
| 99115 |
7320,7260M |
|
| 99116 |
7320,7260M |
|
| 99117 |
7349,7261M |
|
| 99118 |
7320,7260M |
|
| 99119 |
7320,7260M |
|
| 99120 |
7258M |
|
| 99121 |
7258M |
|
| 99122 |
7345,7347,7259M |
|
| 99123 |
7258M |
|
| 99124 |
7345,7347,7259M |
|
| 99125 |
7258M |
|
| 99126 |
7345,7347,7259M |
|