Query time 0.00156
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "73.21"
},
"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": 84,
"rows_produced_per_join": 84,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (1554,1560,3452,4009,1556,2527,1561,1134,5696,2088,2490,4022,9,2698,1406,5290,5721,508,1555,3090,2372,1587,4013,5621))",
"cost_info": {
"read_cost": "35.41",
"eval_cost": "8.40",
"prefix_cost": "43.81",
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "21.00",
"eval_cost": "0.42",
"prefix_cost": "73.21",
"data_read_per_join": "13K"
},
"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 |
| 9 |
174,166,372,454,453,190M |
| 508 |
234,166,235M |
| 1134 |
322,166,323M |
| 1406 |
234,166,326M |
| 1554 |
407,412,402,359,328,166,360M |
| 1555 |
408,402,328,166,364M |
| 1556 |
407,412,402,359,328,166,360M |
| 1560 |
412,407,402,359,328,166,360M |
| 1561 |
412,407,402,359,328,166,360M |
| 1587 |
410,405,402,342,328,166,362M |
| 2088 |
371,250,397M |
| 2372 |
329,166,347M |
| 2490 |
166,234,236M |
| 2527 |
234,166,236M |
| 2698 |
450,424,423,166M |
| 3090 |
329,166,344M |
| 3452 |
458,250,485M |
| 4009 |
371,250,394M |
| 4013 |
167,166,353M |
| 4022 |
167,166,356M |
| 5290 |
250,372,563,557,555,553,552,561M |
| 5621 |
423,449,166M |
| 5696 |
423,449,166M |
| 5721 |
423,585,166M |