Query time 0.00133
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "51.58"
},
"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": 57,
"rows_produced_per_join": 57,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.98",
"eval_cost": "5.70",
"prefix_cost": "11.68",
"data_read_per_join": "912"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (96300,96301,96708,96718,96719,96720,96724,96734,96735,96738,96739,96743,96746,96747,96749,96751,96758,96759,96764,96775,96789,96790,96985,96986,96987,96988,96989,96990,96991,96992))"
}
},
{
"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": 57,
"filtered": "100.00",
"cost_info": {
"read_cost": "14.25",
"eval_cost": "5.70",
"prefix_cost": "31.63",
"data_read_per_join": "912"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "14.25",
"eval_cost": "0.29",
"prefix_cost": "51.58",
"data_read_per_join": "7K"
},
"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 |
| 96300 |
7305,7160M |
|
| 96301 |
7305,7160M |
|
| 96708 |
7301,7151M |
|
| 96718 |
7301,7151M |
|
| 96719 |
7301,7151M |
|
| 96720 |
7301,7151M |
|
| 96724 |
7301,7151M |
|
| 96734 |
7301,7151M |
|
| 96735 |
7301,7151M |
|
| 96738 |
7301,7151M |
|
| 96739 |
7303,7161M |
|
| 96743 |
7301,7151M |
|
| 96746 |
7162M |
|
| 96747 |
7162M |
|
| 96749 |
7305,7160M |
|
| 96751 |
7162M |
|
| 96758 |
7301,7151M |
|
| 96759 |
7301,7151M |
|
| 96764 |
7301,7151M |
|
| 96775 |
7301,7151M |
|
| 96789 |
7305,7160M |
|
| 96790 |
7305,7160M |
|
| 96985 |
7303,7161M |
|
| 96986 |
7303,7161M |
|
| 96987 |
7303,7161M |
|
| 96988 |
7303,7161M |
|
| 96989 |
7303,7161M |
|
| 96990 |
7303,7161M |
|
| 96991 |
7303,7161M |
|
| 96992 |
7303,7161M |
|