Query time 0.00109
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "109.29"
},
"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": 192,
"rows_produced_per_join": 192,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "19.53",
"eval_cost": "19.20",
"prefix_cost": "38.73",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (91125,91127,91129,91200,91202,91206,91208,91211,91213,91215,91255,91257,91261,91263,91266,91268,91270,85352,85354,91145,91147,91151,91153,91156,91158,91160,82811,82813,82884,82886,82957,82959,83331,83333,83341,83343,89493,89494,89501,89502,89509,89510,89517,89518,82592,82594,83355,83357,86630,86632,86699,86701,82822,82824,82895,82897,82968,82970,86190,86191,86213,86214,86522,86523,86798,86799,86188,86211,86520,86796,82603,82605,83071,83072,83624,83625,90907,90908,90986,90987,85082,85168,85214,85260,85122,86189,86212,86521,86797,89073,83069,83622,90905,90984,85080,85166))"
}
},
{
"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": 9,
"filtered": "5.00",
"cost_info": {
"read_cost": "48.00",
"eval_cost": "0.96",
"prefix_cost": "105.93",
"data_read_per_join": "25K"
},
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.40",
"eval_cost": "0.96",
"prefix_cost": "109.29",
"data_read_per_join": "153"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82592 |
7170,7171M |
0 |
| 82594 |
7170,7171M |
0 |
| 82603 |
7170,7171M |
0 |
| 82605 |
7170,7171M |
0 |
| 82811 |
7170,7171M |
0 |
| 82813 |
7170,7171M |
0 |
| 82822 |
7170,7171M |
0 |
| 82824 |
7170,7171M |
0 |
| 82884 |
7170,7171M |
0 |
| 82886 |
7170,7171M |
0 |
| 82895 |
7170,7171M |
0 |
| 82897 |
7170,7171M |
0 |
| 82957 |
7170,7171M |
0 |
| 82959 |
7170,7171M |
0 |
| 82968 |
7170,7171M |
0 |
| 82970 |
7170,7171M |
0 |
| 83069 |
7170,7171M |
0 |
| 83071 |
7170,7171M |
0 |
| 83072 |
7170,7171M |
0 |
| 83331 |
7170,7171M |
0 |
| 83333 |
7170,7171M |
0 |
| 83341 |
7170,7171M |
0 |
| 83343 |
7170,7171M |
0 |
| 83355 |
7170,7171M |
0 |
| 83357 |
7170,7171M |
0 |
| 83622 |
7170,7171M |
0 |
| 83624 |
7170,7171M |
0 |
| 83625 |
7170,7171M |
0 |
| 85080 |
7170,7171M |
0 |
| 85082 |
7170,7171M |
0 |
| 85122 |
7170,7171M |
0 |
| 85166 |
7170,7171M |
0 |
| 85168 |
7170,7171M |
0 |
| 85214 |
7170,7171M |
0 |
| 85260 |
7170,7171M |
0 |
| 85352 |
7170,7171M |
0 |
| 85354 |
7170,7171M |
0 |
| 86188 |
7170,7171M |
0 |
| 86189 |
7170,7171M |
0 |
| 86190 |
7170,7171M |
0 |
| 86191 |
7170,7171M |
0 |
| 86211 |
7170,7171M |
0 |
| 86212 |
7170,7171M |
0 |
| 86213 |
7170,7171M |
0 |
| 86214 |
7170,7171M |
0 |
| 86520 |
7170,7171M |
0 |
| 86521 |
7170,7171M |
0 |
| 86522 |
7170,7171M |
0 |
| 86523 |
7170,7171M |
0 |
| 86630 |
7170,7171M |
0 |
| 86632 |
7170,7171M |
0 |
| 86699 |
7170,7171M |
0 |
| 86701 |
7170,7171M |
0 |
| 86796 |
7170,7171M |
0 |
| 86797 |
7170,7171M |
0 |
| 86798 |
7170,7171M |
0 |
| 86799 |
7170,7171M |
0 |
| 89073 |
7170,7171M |
0 |
| 89493 |
7170,7171M |
0 |
| 89494 |
7170,7171M |
0 |
| 89501 |
7170,7171M |
0 |
| 89502 |
7170,7171M |
0 |
| 89509 |
7170,7171M |
0 |
| 89510 |
7170,7171M |
0 |
| 89517 |
7170,7171M |
0 |
| 89518 |
7170,7171M |
0 |
| 90905 |
7171,7170M |
0 |
| 90907 |
7171,7170M |
0 |
| 90908 |
7171,7170M |
0 |
| 90984 |
7171,7170M |
0 |
| 90986 |
7171,7170M |
0 |
| 90987 |
7171,7170M |
0 |
| 91125 |
7171,7170M |
0 |
| 91127 |
7171,7170M |
0 |
| 91129 |
7171,7170M |
0 |
| 91145 |
7171,7170M |
0 |
| 91147 |
7171,7170M |
0 |
| 91151 |
7171,7170M |
0 |
| 91153 |
7171,7170M |
0 |
| 91156 |
7171,7170M |
0 |
| 91158 |
7171,7170M |
0 |
| 91160 |
7171,7170M |
0 |
| 91200 |
7171,7170M |
0 |
| 91202 |
7171,7170M |
0 |
| 91206 |
7171,7170M |
0 |
| 91208 |
7171,7170M |
0 |
| 91211 |
7171,7170M |
0 |
| 91213 |
7171,7170M |
0 |
| 91215 |
7171,7170M |
0 |
| 91255 |
7171,7170M |
0 |
| 91257 |
7171,7170M |
0 |
| 91261 |
7171,7170M |
0 |
| 91263 |
7171,7170M |
0 |
| 91266 |
7171,7170M |
0 |
| 91268 |
7171,7170M |
0 |
| 91270 |
7171,7170M |
0 |