Query time 0.00253
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "59.78"
},
"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": 67,
"rows_produced_per_join": 67,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5238,5261,5578,5673,8716,5545,5446,5800,5835,5910,5873,5219,5005,5468,5536,5551,5797,6688,8711,2904))",
"cost_info": {
"read_cost": "28.46",
"eval_cost": "6.70",
"prefix_cost": "35.16",
"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": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "16.75",
"eval_cost": "0.34",
"prefix_cost": "58.61",
"data_read_per_join": "10K"
},
"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": 3,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.84",
"eval_cost": "0.34",
"prefix_cost": "59.78",
"data_read_per_join": "53"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 2904 |
461,372,465M |
0 |
| 5005 |
561,555,557,552,553,372,250,563M |
0 |
| 5219 |
372,550M |
0 |
| 5238 |
372,549M |
0 |
| 5261 |
250,372,557,555,560,553,552,562M |
0 |
| 5446 |
466,372,574M |
0 |
| 5468 |
250,372,556,553,552,554M |
0 |
| 5536 |
466,372,579M |
0 |
| 5545 |
250,372,552,557,560,553,555,562M |
0 |
| 5551 |
372,466M |
0 |
| 5578 |
572,372,582M |
0 |
| 5673 |
553,555,250,560,557,552,372,562M |
0 |
| 5797 |
372,583M |
0 |
| 5800 |
372,583M |
0 |
| 5835 |
372,583M |
0 |
| 5873 |
572,372,582M |
0 |
| 5910 |
595M |
|
| 6688 |
466,467M |
|
| 8711 |
166,453,190,372,174,454M |
0 |
| 8716 |
372,166,174,454,453,190M |
0 |