Query time 0.00253
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "100.02"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 115,
"rows_produced_per_join": 115,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5547,5675,5534,5471,5674,5401,5538,5542,5548,8362,5199,5400,5103,6245,5399,5201,5572,6116,6253,10177,5931,5202,8375,8812))",
"cost_info": {
"read_cost": "46.26",
"eval_cost": "11.50",
"prefix_cost": "57.76",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": [
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "28.75",
"eval_cost": "0.58",
"prefix_cost": "98.01",
"data_read_per_join": "18K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)) and ((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`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",
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.44",
"eval_cost": "0.58",
"prefix_cost": "100.02",
"data_read_per_join": "92"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 5103 |
552,557,555,553,250,372,562,560M |
0 |
| 5199 |
328,402,407,359,360,166,250,412M |
0 |
| 5201 |
557,555,250,372,560,553,552,562M |
0 |
| 5202 |
250,372,557,555,562,553,552,560M |
0 |
| 5399 |
250,553,555,560,562M |
0 |
| 5400 |
250,553,555,560,552,557,562M |
0 |
| 5401 |
250,553,555,560,562M |
0 |
| 5471 |
372,250,556,553,552,554M |
0 |
| 5534 |
552,372,250,556,553,554M |
0 |
| 5538 |
372,250,556,553,552,554M |
0 |
| 5542 |
553,250,552,554,372,556M |
0 |
| 5547 |
553,250,552,554,372,556M |
0 |
| 5548 |
553,250,552,554,372,556M |
0 |
| 5572 |
553,555,250,560,557,552,372,562M |
0 |
| 5674 |
553,555,250,560,557,552,372,562M |
0 |
| 5675 |
555,250,553,560,557,552,372,562M |
0 |
| 5931 |
413,407,402,250,359,328,166,361M |
0 |
| 6116 |
350,166,308,387,250,383M |
0 |
| 6245 |
556,554M |
|
| 6253 |
554,556M |
|
| 8362 |
423,380M |
|
| 8375 |
386,382M |
|
| 8812 |
426,570,571,567M |
|
| 10177 |
439M |
|