Query time 0.00129
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "20.97"
},
"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": 23,
"rows_produced_per_join": 23,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.57",
"eval_cost": "2.30",
"prefix_cost": "4.87",
"data_read_per_join": "368"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (99181,99185,99186,99187,99188,99195,99196,99201,99202,99205,99210,99211,99212,99216,99217,99220,99241,99267,100386,100387,100393,100394,100434))"
}
},
{
"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": 23,
"filtered": "100.00",
"cost_info": {
"read_cost": "5.75",
"eval_cost": "2.30",
"prefix_cost": "12.92",
"data_read_per_join": "368"
},
"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": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "5.75",
"eval_cost": "0.12",
"prefix_cost": "20.97",
"data_read_per_join": "3K"
},
"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 |
| 99181 |
7199M |
|
| 99185 |
7199M |
|
| 99186 |
7209M |
|
| 99187 |
7199M |
|
| 99188 |
7209M |
|
| 99195 |
7209M |
|
| 99196 |
7203M |
|
| 99201 |
7203M |
|
| 99202 |
7199M |
|
| 99205 |
7199M |
|
| 99210 |
7203M |
|
| 99211 |
7203M |
|
| 99212 |
7199M |
|
| 99216 |
7264M |
|
| 99217 |
7209M |
|
| 99220 |
7199M |
|
| 99241 |
7209M |
|
| 99267 |
7209M |
|
| 100386 |
7199M |
|
| 100387 |
7199M |
|
| 100393 |
7209M |
|
| 100394 |
7209M |
|
| 100434 |
7199M |
|