Query time 0.00335
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "101.34"
},
"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": 178,
"rows_produced_per_join": 178,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "18.12",
"eval_cost": "17.80",
"prefix_cost": "35.92",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (89485,90083,86220,83128,84030,84031,84032,84033,84038,90082,88935,89188,89724,88934,83131,90084,89647,89619,89632,86381,92450,92451,92452,92453,92454,92455,92456,89642,89644,89645,91838,90110,90070,89177,92042,92058,92074,92130,83103,85530,85534,84109,90090,90100,83105,84745,83986,83987,83988,83989,84111,90087,90097,88930,90107,91837,92011,92012,92013,92014,92015,92016,92017,92099,92100,92101,92102,92103,92104,92105,83089,84096,83104,84110,90080,83092,92500,84099,86219,89526,89723,90064,89641,91298,83106,91305,84112,89488,89637,92066,92082,83109,83119,85039,91306,91299))"
}
},
{
"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.50",
"eval_cost": "0.89",
"prefix_cost": "98.22",
"data_read_per_join": "23K"
},
"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.23",
"eval_cost": "0.89",
"prefix_cost": "101.34",
"data_read_per_join": "142"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83089 |
7185M |
|
| 83092 |
7185M |
|
| 83103 |
7186M |
|
| 83104 |
7185M |
|
| 83105 |
7184,7187M |
0 |
| 83106 |
7184,7187M |
0 |
| 83109 |
7186M |
|
| 83119 |
7186M |
|
| 83128 |
7186M |
|
| 83131 |
7184,7187M |
0 |
| 83986 |
7186M |
|
| 83987 |
7186M |
|
| 83988 |
7186M |
|
| 83989 |
7186M |
|
| 84030 |
7184,7187M |
0 |
| 84031 |
7184,7187M |
0 |
| 84032 |
7184,7187M |
0 |
| 84033 |
7184,7187M |
0 |
| 84038 |
7184,7187M |
0 |
| 84096 |
7185M |
|
| 84099 |
7185M |
|
| 84109 |
7186M |
|
| 84110 |
7185M |
|
| 84111 |
7184,7187M |
0 |
| 84112 |
7184,7187M |
0 |
| 84745 |
7185M |
|
| 85039 |
7341,7342,7343,7157M |
|
| 85530 |
7186M |
|
| 85534 |
7184,7187M |
0 |
| 86219 |
7186M |
|
| 86220 |
7185M |
|
| 86381 |
7185M |
|
| 88930 |
7184,7187M |
0 |
| 88934 |
7184,7187M |
0 |
| 88935 |
7184,7187M |
0 |
| 89177 |
7185M |
|
| 89188 |
7185M |
|
| 89485 |
7186M |
|
| 89488 |
7184,7187M |
0 |
| 89526 |
7184,7187M |
0 |
| 89619 |
7186M |
|
| 89632 |
7186M |
|
| 89637 |
7184M |
0 |
| 89641 |
7184,7187M |
0 |
| 89642 |
7184,7187M |
0 |
| 89644 |
7184,7187M |
0 |
| 89645 |
7186M |
|
| 89647 |
7184,7187M |
0 |
| 89723 |
7186M |
|
| 89724 |
7185M |
|
| 90064 |
7184,7187M |
0 |
| 90070 |
7185M |
|
| 90080 |
7184,7187M |
0 |
| 90082 |
7185M |
|
| 90083 |
7184,7187M |
0 |
| 90084 |
7184,7187M |
0 |
| 90087 |
7186M |
|
| 90090 |
7184,7187M |
0 |
| 90097 |
7186M |
|
| 90100 |
7184,7187M |
0 |
| 90107 |
7184,7187M |
0 |
| 90110 |
7184,7187M |
0 |
| 91298 |
7187,7184M |
0 |
| 91299 |
7186M |
|
| 91305 |
7187,7184M |
0 |
| 91306 |
7187,7184M |
0 |
| 91837 |
7341,7342,7343,7157M |
|
| 91838 |
7341,7342,7343,7157M |
|
| 92011 |
7186,7184M |
0 |
| 92012 |
7186,7184M |
0 |
| 92013 |
7186,7184M |
0 |
| 92014 |
7186,7184M |
0 |
| 92015 |
7186,7184M |
0 |
| 92016 |
7186,7184M |
0 |
| 92017 |
7186,7184M |
0 |
| 92042 |
7187,7184M |
0 |
| 92058 |
7187,7184M |
0 |
| 92066 |
7188M |
|
| 92074 |
7187,7184M |
0 |
| 92082 |
7188M |
|
| 92099 |
7186,7184M |
0 |
| 92100 |
7186,7184M |
0 |
| 92101 |
7186,7184M |
0 |
| 92102 |
7186,7184M |
0 |
| 92103 |
7186,7184M |
0 |
| 92104 |
7186,7184M |
0 |
| 92105 |
7186,7184M |
0 |
| 92130 |
7187,7184M |
0 |
| 92450 |
7341,7342,7343,7157M |
|
| 92451 |
7341,7342,7343,7157M |
|
| 92452 |
7341,7342,7343,7157M |
|
| 92453 |
7341,7342,7343,7157M |
|
| 92454 |
7341,7342,7343,7157M |
|
| 92455 |
7341,7342,7343,7157M |
|
| 92456 |
7341,7342,7343,7157M |
|
| 92500 |
7341,7342,7343,7157M |
|