Query time 0.00162
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "66.81"
},
"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": 76,
"rows_produced_per_join": 76,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3441,3811,7485,2908,3882,5652,6769,6508,4222,5902,2400,4585,4735,2704,5814,2832,5251,5303,3361,2221,4142,5025,6054,4239))",
"cost_info": {
"read_cost": "32.61",
"eval_cost": "7.60",
"prefix_cost": "40.21",
"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.00",
"eval_cost": "0.38",
"prefix_cost": "66.81",
"data_read_per_join": "11K"
},
"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 |
| 2221 |
424,423,451,166M |
| 2400 |
308,350,386,250,166,382M |
| 2704 |
329,166,457M |
| 2832 |
527,329,455,453,372,174,166,337M |
| 2908 |
372,466,467M |
| 3361 |
166,378,483M |
| 3441 |
166,423,448M |
| 3811 |
423,449,166M |
| 3882 |
166,378,490M |
| 4142 |
219,507M |
| 4222 |
167,166,353M |
| 4239 |
386,308,250,350,166,382M |
| 4585 |
513,166,516M |
| 4735 |
167,166,532M |
| 5025 |
513,166,517M |
| 5251 |
328,402,405,342,410,166,250,362M |
| 5303 |
372,552,550M |
| 5652 |
372,384,460M |
| 5814 |
410,405,402,250,342,328,166,362M |
| 5902 |
566,372,595M |
| 6054 |
423,166,585M |
| 6508 |
601M |
| 6769 |
372,460M |
| 7485 |
583M |