Query time 0.00152
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "100.20"
},
"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": 176,
"rows_produced_per_join": 176,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "17.92",
"eval_cost": "17.60",
"prefix_cost": "35.52",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (86688,86690,83041,83043,90877,90879,90956,90958,91070,91071,91073,91074,91075,89815,89867,89939,91505,82841,82914,82987,85303,85400,85451,85502,86492,86494,86768,86770,84663,84664,85306,85308,85403,85405,85454,85456,85505,85507,91114,91116,91120,91122,91125,91127,91129,91200,91202,91206,91208,91211,91213,91215,91255,91257,91261,91263,91266,91268,91270,85352,85354,85349,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,84302,84303,90567,90573,90579,82592,82594,83355,83357))"
}
},
{
"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": 8,
"filtered": "5.00",
"cost_info": {
"read_cost": "44.00",
"eval_cost": "0.88",
"prefix_cost": "97.12",
"data_read_per_join": "22K"
},
"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": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.20",
"eval_cost": "0.88",
"prefix_cost": "100.20",
"data_read_per_join": "140"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 82592 |
7170,7171M |
0 |
| 82594 |
7170,7171M |
0 |
| 82811 |
7170,7171M |
0 |
| 82813 |
7170,7171M |
0 |
| 82841 |
7192M |
|
| 82884 |
7170,7171M |
0 |
| 82886 |
7170,7171M |
0 |
| 82914 |
7192M |
|
| 82957 |
7170,7171M |
0 |
| 82959 |
7170,7171M |
0 |
| 82987 |
7192M |
|
| 83041 |
7170,7171M |
0 |
| 83043 |
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 |
| 84302 |
7223M |
|
| 84303 |
7223M |
|
| 84663 |
7223M |
|
| 84664 |
7223M |
|
| 85303 |
7192M |
|
| 85306 |
7170,7171M |
0 |
| 85308 |
7170,7171M |
0 |
| 85349 |
7192M |
|
| 85352 |
7170,7171M |
0 |
| 85354 |
7170,7171M |
0 |
| 85400 |
7192M |
|
| 85403 |
7170,7171M |
0 |
| 85405 |
7170,7171M |
0 |
| 85451 |
7192M |
|
| 85454 |
7170,7171M |
0 |
| 85456 |
7170,7171M |
0 |
| 85502 |
7192M |
|
| 85505 |
7170,7171M |
0 |
| 85507 |
7170,7171M |
0 |
| 86492 |
7170,7171M |
0 |
| 86494 |
7170,7171M |
0 |
| 86688 |
7170,7171M |
0 |
| 86690 |
7170,7171M |
0 |
| 86768 |
7170,7171M |
0 |
| 86770 |
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 |
| 89815 |
7192M |
|
| 89867 |
7192M |
|
| 89939 |
7192M |
|
| 90567 |
7170,7191M |
0 |
| 90573 |
7170,7191M |
0 |
| 90579 |
7170,7191M |
0 |
| 90877 |
7171,7170M |
0 |
| 90879 |
7171,7170M |
0 |
| 90956 |
7171,7170M |
0 |
| 90958 |
7171,7170M |
0 |
| 91070 |
7191,7170M |
0 |
| 91071 |
7191,7170M |
0 |
| 91073 |
7191,7170M |
0 |
| 91074 |
7191,7170M |
0 |
| 91075 |
7191,7170M |
0 |
| 91114 |
7171,7170M |
0 |
| 91116 |
7171,7170M |
0 |
| 91120 |
7171,7170M |
0 |
| 91122 |
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 |
| 91505 |
7192M |
|