Query time 0.00221
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "134.06"
},
"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": 112,
"rows_produced_per_join": 112,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5189,5184,5115,5178,5181,5672,5646,5183,5675,5674,5401,5400,5103,5399,5201,5572,5202,10954,11057,11010,11012))",
"cost_info": {
"read_cost": "44.46",
"eval_cost": "11.20",
"prefix_cost": "55.66",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": 112,
"filtered": "100.00",
"cost_info": {
"read_cost": "28.00",
"eval_cost": "11.20",
"prefix_cost": "94.86",
"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": [
"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.00",
"eval_cost": "0.56",
"prefix_cost": "134.06",
"data_read_per_join": "17K"
},
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 5103 |
552,557,555,553,250,372,562,560M |
0 |
| 5115 |
250,372,557,555,562,553,552,560M |
0 |
| 5178 |
555,250,372,553,552,557,563,561M |
0 |
| 5181 |
250,372,557,555,562,553,552,560M |
0 |
| 5183 |
563,557,555,250,372,553,552,561M |
0 |
| 5184 |
563,250,555,557,552,553,372,561M |
0 |
| 5189 |
250,372,557,555,553,560,552,562M |
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 |
| 5572 |
553,555,250,560,557,552,372,562M |
0 |
| 5646 |
553,555,250,560,557,552,372,562M |
0 |
| 5672 |
555,553,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 |
| 10954 |
560,562M |
|
| 11010 |
562,560M |
|
| 11012 |
562,560M |
|
| 11057 |
560,562M |
|