Query time 0.00122
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "32.06"
},
"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": 56,
"rows_produced_per_join": 56,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.88",
"eval_cost": "5.60",
"prefix_cost": "11.48",
"data_read_per_join": "896"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (99115,99116,99118,99119,99122,99124,99126,99129,99130,99132,99134,99143,99163,99164,99166,99172,99173,99175,99178,99180,99184,99192,99194,99197))"
}
},
{
"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.00",
"eval_cost": "0.28",
"prefix_cost": "31.08",
"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')))"
}
},
{
"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.70",
"eval_cost": "0.28",
"prefix_cost": "32.06",
"data_read_per_join": "44"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 99115 |
7320,7260M |
|
| 99116 |
7320,7260M |
|
| 99118 |
7320,7260M |
|
| 99119 |
7320,7260M |
|
| 99122 |
7345,7347,7259M |
|
| 99124 |
7345,7347,7259M |
|
| 99126 |
7345,7347,7259M |
|
| 99129 |
7345,7347,7259M |
|
| 99130 |
7320,7260M |
|
| 99132 |
7320,7260M |
|
| 99134 |
7320,7260M |
|
| 99143 |
7320,7260M |
|
| 99163 |
7345,7347,7259M |
|
| 99164 |
7320,7260M |
|
| 99166 |
7320,7260M |
|
| 99172 |
7345,7347,7259M |
|
| 99173 |
7320,7260M |
|
| 99175 |
7320,7260M |
|
| 99178 |
7345,7347,7259M |
|
| 99180 |
7320,7260M |
|
| 99184 |
7345,7347,7259M |
|
| 99192 |
7320,7260M |
|
| 99194 |
7320,7260M |
|
| 99197 |
7320,7260M |
|