Query time 0.01458
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "92.10"
},
"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": 102,
"rows_produced_per_join": 102,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "10.50",
"eval_cost": "10.20",
"prefix_cost": "20.70",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (97698,97699,97700,97701,97702,97703,97704,97705,97706,97707,97708,97709,97710,97711,97712,98054,98055,98056,98057,98058,98059,98060,98061,98062,98063,98064,98065,98066,98067,98068))"
}
},
{
"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": 102,
"filtered": "100.00",
"cost_info": {
"read_cost": "25.50",
"eval_cost": "10.20",
"prefix_cost": "56.40",
"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": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "25.50",
"eval_cost": "0.51",
"prefix_cost": "92.10",
"data_read_per_join": "13K"
},
"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 |
| 97698 |
7261M,7349 |
|
| 97699 |
7260M,7320 |
|
| 97700 |
7260M,7320 |
|
| 97701 |
7260M,7320 |
|
| 97702 |
7260M,7320 |
|
| 97703 |
7261M,7349 |
|
| 97704 |
7258M |
|
| 97705 |
7259M,7345,7347 |
|
| 97706 |
7260M,7320 |
|
| 97707 |
7208M,7241,7309,7346 |
|
| 97708 |
7208M,7241,7309,7346 |
|
| 97709 |
7208M,7241,7309,7346 |
|
| 97710 |
7208M,7241,7309,7346 |
|
| 97711 |
7208M,7241,7309,7346 |
|
| 97712 |
7208M,7241,7309,7346 |
|
| 98054 |
7208M,7241,7309,7346 |
|
| 98055 |
7208M,7241,7309,7346 |
|
| 98056 |
7208M,7241,7309,7346 |
|
| 98057 |
7208M,7241,7309,7346 |
|
| 98058 |
7208M,7241,7309,7346 |
|
| 98059 |
7208M,7241,7309,7346 |
|
| 98060 |
7208M,7241,7309,7346 |
|
| 98061 |
7208M,7241,7309,7346 |
|
| 98062 |
7208M,7241,7309,7346 |
|
| 98063 |
7208M,7241,7309,7346 |
|
| 98064 |
7208M,7241,7309,7346 |
|
| 98065 |
7208M,7241,7309,7346 |
|
| 98066 |
7208M,7241,7309,7346 |
|
| 98067 |
7208M,7241,7309,7346 |
|
| 98068 |
7208M,7241,7309,7346 |
|