Query time 0.01418
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "70.49"
},
"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": 78,
"rows_produced_per_join": 78,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "8.09",
"eval_cost": "7.80",
"prefix_cost": "15.89",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (93772,93773,93774,93775,93776,93777,93778,93779,93780,93825,93826,93827,93828,93829,94073,94140,94141,94142,94143,94144,94145,94146,94147,94148,94149,94150,94151,94152,94153,94154,94155,94156,94157,94158,94159,94160,94452,94453,94454,94455,94456,94458,94459,94460,94461,94462,94604,94605))"
}
},
{
"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": 78,
"filtered": "100.00",
"cost_info": {
"read_cost": "19.50",
"eval_cost": "7.80",
"prefix_cost": "43.19",
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "19.50",
"eval_cost": "0.39",
"prefix_cost": "70.49",
"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 |
| 93772 |
7194M |
|
| 93773 |
7194M |
|
| 93774 |
7194M |
|
| 93775 |
7194M |
|
| 93776 |
7194M |
|
| 93777 |
7194M |
|
| 93778 |
7194M |
|
| 93779 |
7194M |
|
| 93780 |
7194M |
|
| 93825 |
7194M |
|
| 93826 |
7194M |
|
| 93827 |
7194M |
|
| 93828 |
7194M |
|
| 93829 |
7194M |
|
| 94073 |
7194M |
|
| 94140 |
7194M |
|
| 94141 |
7194M |
|
| 94142 |
7194M |
|
| 94143 |
7194M |
|
| 94144 |
7194M |
|
| 94145 |
7194M |
|
| 94146 |
7194M |
|
| 94147 |
7194M |
|
| 94148 |
7194M |
|
| 94149 |
7194M |
|
| 94150 |
7194M |
|
| 94151 |
7194M |
|
| 94152 |
7194M |
|
| 94153 |
7194M |
|
| 94154 |
7194M |
|
| 94155 |
7194M |
|
| 94156 |
7194M |
|
| 94157 |
7194M |
|
| 94158 |
7194M |
|
| 94159 |
7194M |
|
| 94160 |
7194M |
|
| 94452 |
7341,7342,7343,7157M |
|
| 94453 |
7341,7342,7343,7157M |
|
| 94454 |
7157M,7343,7341,7342 |
|
| 94455 |
7157M,7343,7341,7342 |
|
| 94456 |
7343,7342,7157M,7341 |
|
| 94458 |
7343,7157M,7341,7342 |
|
| 94459 |
7341,7157M,7342,7343 |
|
| 94460 |
7341,7342,7157M,7343 |
|
| 94461 |
7157M,7343,7342,7341 |
|
| 94462 |
7342,7341,7157M,7343 |
|
| 94604 |
7194M |
|
| 94605 |
7194M |
|