Query time 0.00175
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "69.41"
},
"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": 78,
"rows_produced_per_join": 78,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3023,3024,3401,3402,3522,3523,4130,4131,4132,6101,6102,6103,6104,6105,6106,6107,6108,6109,6266,6267,6268,6269,5985,8264,10135,10136,10137,10138))",
"cost_info": {
"read_cost": "34.31",
"eval_cost": "7.80",
"prefix_cost": "42.11",
"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": "19.50",
"eval_cost": "0.39",
"prefix_cost": "69.41",
"data_read_per_join": "12K"
},
"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 |
| 3023 |
329,166,344M |
| 3024 |
166,329,344M |
| 3401 |
492,424,423,166M |
| 3402 |
423,424,492,166M |
| 3522 |
423,424,450,166M |
| 3523 |
423,424,450,166M |
| 4130 |
513,166,514M |
| 4131 |
513,166,514M |
| 4132 |
513,166,514M |
| 5985 |
454,190M |
| 6101 |
166,423,586M |
| 6102 |
166,423,586M |
| 6103 |
166,423,586M |
| 6104 |
166,423,586M |
| 6105 |
166,423,586M |
| 6106 |
166,423,586M |
| 6107 |
166,423,586M |
| 6108 |
166,423,586M |
| 6109 |
166,423,586M |
| 6266 |
473,476M |
| 6267 |
473,476M |
| 6268 |
473,476M |
| 6269 |
473,476M |
| 8264 |
454,190M |
| 10135 |
372,454,453,190,174,166M |
| 10136 |
372,454,453,190,174,166M |
| 10137 |
372,454,453,190,174,166M |
| 10138 |
372,454,453,190,174,166M |