Query time 0.00274
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "116.67"
},
"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": 205,
"rows_produced_per_join": 205,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "20.83",
"eval_cost": "20.50",
"prefix_cost": "41.33",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92503,92504,92505,92506,92507,92192,92193,92194,92195,92196,92204,92205,92206,92207,92208,92209,92442,92443,92448,92147,92148,92149,92349,92350,92351,92352,89643,89646,89524,83998,84000,84002,84004,84034,90075,90062,84022,84023,84024,84025,84037,89617,89630,83955,83957,83959,83961,92067,92068,92069,92070,92071,92072,92073,92083,92084,92085,92086,92087,92088,92089,91297,92139,92140,92141,92142,92143,92144,92145,86380,92043,92044,92045,92046,92047,92048,92049,92059,92060,92061,92062,92063,92064,92065,92075,92076,92077,92078,92079,92080,92081,92131,92132,92133,92134,92135))"
}
},
{
"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": 10,
"filtered": "5.00",
"cost_info": {
"read_cost": "51.25",
"eval_cost": "1.03",
"prefix_cost": "113.08",
"data_read_per_join": "26K"
},
"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": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.56",
"eval_cost": "1.03",
"prefix_cost": "116.67",
"data_read_per_join": "164"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 83955 |
7186M |
|
| 83957 |
7186M |
|
| 83959 |
7186M |
|
| 83961 |
7186M |
|
| 83998 |
7186M |
|
| 84000 |
7186M |
|
| 84002 |
7186M |
|
| 84004 |
7186M |
|
| 84022 |
7184,7187M |
0 |
| 84023 |
7184,7187M |
0 |
| 84024 |
7184,7187M |
0 |
| 84025 |
7184,7187M |
0 |
| 84034 |
7186M |
|
| 84037 |
7184,7187M |
0 |
| 86380 |
7185M |
|
| 89524 |
7185M |
|
| 89617 |
7186M |
|
| 89630 |
7186M |
|
| 89643 |
7186M |
|
| 89646 |
7185M |
|
| 90062 |
7185M |
|
| 90075 |
7185M |
|
| 91297 |
7185M |
|
| 92043 |
7187,7184M |
0 |
| 92044 |
7187,7184M |
0 |
| 92045 |
7187,7184M |
0 |
| 92046 |
7187,7184M |
0 |
| 92047 |
7187,7184M |
0 |
| 92048 |
7187,7184M |
0 |
| 92049 |
7187,7184M |
0 |
| 92059 |
7187,7184M |
0 |
| 92060 |
7187,7184M |
0 |
| 92061 |
7187,7184M |
0 |
| 92062 |
7187,7184M |
0 |
| 92063 |
7187,7184M |
0 |
| 92064 |
7187,7184M |
0 |
| 92065 |
7187,7184M |
0 |
| 92067 |
7188M |
|
| 92068 |
7188M |
|
| 92069 |
7188M |
|
| 92070 |
7188M |
|
| 92071 |
7188M |
|
| 92072 |
7188M |
|
| 92073 |
7188M |
|
| 92075 |
7187,7184M |
0 |
| 92076 |
7187,7184M |
0 |
| 92077 |
7187,7184M |
0 |
| 92078 |
7187,7184M |
0 |
| 92079 |
7187,7184M |
0 |
| 92080 |
7187,7184M |
0 |
| 92081 |
7187,7184M |
0 |
| 92083 |
7188M |
|
| 92084 |
7188M |
|
| 92085 |
7188M |
|
| 92086 |
7188M |
|
| 92087 |
7188M |
|
| 92088 |
7188M |
|
| 92089 |
7188M |
|
| 92131 |
7187,7184M |
0 |
| 92132 |
7187,7184M |
0 |
| 92133 |
7187,7184M |
0 |
| 92134 |
7187,7184M |
0 |
| 92135 |
7187,7184M |
0 |
| 92139 |
7186M |
|
| 92140 |
7186M |
|
| 92141 |
7186M |
|
| 92142 |
7186M |
|
| 92143 |
7186M |
|
| 92144 |
7186M |
|
| 92145 |
7186M |
|
| 92147 |
7341,7342,7343,7157M |
|
| 92148 |
7341,7342,7343,7157M |
|
| 92149 |
7341,7342,7343,7157M |
|
| 92192 |
7341,7342,7343,7157M |
|
| 92193 |
7341,7342,7343,7157M |
|
| 92194 |
7341,7342,7343,7157M |
|
| 92195 |
7341,7342,7343,7157M |
|
| 92196 |
7341,7342,7343,7157M |
|
| 92204 |
7341,7342,7343,7157M |
|
| 92205 |
7341,7342,7343,7157M |
|
| 92206 |
7341,7342,7343,7157M |
|
| 92207 |
7341,7342,7343,7157M |
|
| 92208 |
7341,7342,7343,7157M |
|
| 92209 |
7341,7342,7343,7157M |
|
| 92349 |
7341,7342,7343,7157M |
|
| 92350 |
7341,7342,7343,7157M |
|
| 92351 |
7341,7342,7343,7157M |
|
| 92352 |
7341,7342,7343,7157M |
|
| 92442 |
7341,7342,7343,7157M |
|
| 92443 |
7341,7342,7343,7157M |
|
| 92448 |
7341,7342,7343,7157M |
|
| 92503 |
7341,7342,7343,7157M |
|
| 92504 |
7341,7342,7343,7157M |
|
| 92505 |
7341,7342,7343,7157M |
|
| 92506 |
7341,7342,7343,7157M |
|
| 92507 |
7341,7342,7343,7157M |
|