Query time 0.00146
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.52"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.08",
"eval_cost": "4.80",
"prefix_cost": "9.88",
"data_read_per_join": "768"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93129,93130,93131,93132,93134,93136,93138,93139,93140,93141,93142,93143,93144,93145,93146,93147,93148,93149,93160,93161,93162,93163,93164,93165,93166,93167,93168,93169,93170,93171,93172,93173,93174,93175,93176,93177,93178,93179,93180,93181,93182,93183,93184,93185,93186,93187,93188,93189))"
}
},
{
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "26.68",
"data_read_per_join": "6K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.60",
"eval_cost": "0.24",
"prefix_cost": "27.52",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 93129 |
7192M |
0 |
| 93130 |
7192M |
0 |
| 93131 |
7192M |
0 |
| 93132 |
7192M |
0 |
| 93134 |
7192M |
0 |
| 93136 |
7192M |
0 |
| 93138 |
7192M |
0 |
| 93139 |
7192M |
0 |
| 93140 |
7192M |
0 |
| 93141 |
7192M |
0 |
| 93142 |
7192M |
0 |
| 93143 |
7192M |
0 |
| 93144 |
7192M |
0 |
| 93145 |
7192M |
0 |
| 93146 |
7192M |
0 |
| 93147 |
7192M |
0 |
| 93148 |
7192M |
0 |
| 93149 |
7192M |
0 |
| 93160 |
7192M |
0 |
| 93161 |
7192M |
0 |
| 93162 |
7192M |
0 |
| 93163 |
7192M |
0 |
| 93164 |
7192M |
0 |
| 93165 |
7192M |
0 |
| 93166 |
7192M |
0 |
| 93167 |
7192M |
0 |
| 93168 |
7192M |
0 |
| 93169 |
7192M |
0 |
| 93170 |
7192M |
0 |
| 93171 |
7192M |
0 |
| 93172 |
7192M |
0 |
| 93173 |
7192M |
0 |
| 93174 |
7192M |
0 |
| 93175 |
7192M |
0 |
| 93176 |
7192M |
0 |
| 93177 |
7192M |
0 |
| 93178 |
7192M |
0 |
| 93179 |
7192M |
0 |
| 93180 |
7192M |
0 |
| 93181 |
7192M |
0 |
| 93182 |
7192M |
0 |
| 93183 |
7192M |
0 |
| 93184 |
7192M |
0 |
| 93185 |
7192M |
0 |
| 93186 |
7192M |
0 |
| 93187 |
7192M |
0 |
| 93188 |
7192M |
0 |
| 93189 |
7192M |
0 |