Query time 0.00190
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "54.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": 61,
"rows_produced_per_join": 61,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3801,3919,4196,4362,7346,2880,2268,2091,4514,4454,5778,2208,10097,2115,1845,2089,3356,3498,4475,5028,5286,10267,3014,4794))",
"cost_info": {
"read_cost": "27.36",
"eval_cost": "6.10",
"prefix_cost": "33.46",
"data_read_per_join": "976"
},
"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": "15.25",
"eval_cost": "0.31",
"prefix_cost": "54.81",
"data_read_per_join": "9K"
},
"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 |
| 1845 |
371,250,394M |
| 2089 |
371,250,397M |
| 2091 |
371,250,398M |
| 2115 |
167,166,352M |
| 2208 |
351,166,430M |
| 2268 |
329,166,344M |
| 2880 |
329,166,344M |
| 3014 |
329,166,344M |
| 3356 |
424,423,166M |
| 3498 |
458,250,488M |
| 3801 |
166,250,328,565,402,564M |
| 3919 |
166,378,490M |
| 4196 |
513,166,517M |
| 4362 |
219,496,494M |
| 4454 |
513,166,514M |
| 4475 |
250,399,329,166,400M |
| 4514 |
219,496M |
| 4794 |
320,166,325M |
| 5028 |
522,521,535M |
| 5286 |
372,250,553,552,563,557,555,561M |
| 5778 |
572,372,582M |
| 7346 |
623M |
| 10097 |
464M |
| 10267 |
462M |