Query time 0.01487
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "72.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": 80,
"rows_produced_per_join": 80,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.29",
"eval_cost": "8.00",
"prefix_cost": "16.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (92221,92222,92224,92225,92226,92467,84241,87234,87235,87236,87239,87240,87241,87244,87245,87246,87249,87250,87251,86894,92232,92233,92234,92235,92236,92238,92468,92472,92473,92474))"
}
},
{
"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": 80,
"filtered": "100.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "8.00",
"prefix_cost": "44.29",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "0.40",
"prefix_cost": "72.29",
"data_read_per_join": "10K"
},
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 84241 |
7194M |
|
| 86894 |
7156,7157M,7148 |
0 |
| 87234 |
7194M |
|
| 87235 |
7194M |
|
| 87236 |
7194M |
|
| 87239 |
7194M |
|
| 87240 |
7194M |
|
| 87241 |
7194M |
|
| 87244 |
7194M |
|
| 87245 |
7194M |
|
| 87246 |
7194M |
|
| 87249 |
7194M |
|
| 87250 |
7194M |
|
| 87251 |
7194M |
|
| 92221 |
7342,7343,7157M,7341 |
|
| 92222 |
7342,7341,7343,7157M |
|
| 92224 |
7342,7341,7157M,7343 |
|
| 92225 |
7157M,7342,7343,7341 |
|
| 92226 |
7157M,7343,7341,7342 |
|
| 92232 |
7157M,7341,7342,7343 |
|
| 92233 |
7341,7342,7343,7157M |
|
| 92234 |
7342,7341,7343,7157M |
|
| 92235 |
7342,7341,7343,7157M |
|
| 92236 |
7342,7343,7341,7157M |
|
| 92238 |
7341,7342,7157M,7343 |
|
| 92467 |
7343,7157M,7341,7342 |
|
| 92468 |
7342,7157M,7341,7343 |
|
| 92472 |
7343,7157M,7342,7341 |
|
| 92473 |
7157M,7343,7342,7341 |
|
| 92474 |
7341,7343,7157M,7342 |
|