Query time 0.00156
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 (5764,5765,5766,5861,5860,5914,5913,5917,5916,5774,5975,5778,5976,5763,6212,6577,6580,6581,6578,9014,9015,11452,11456,11457))",
"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 |
| 5763 |
572,372,582M |
| 5764 |
572,372,582M |
| 5765 |
572,372,582M |
| 5766 |
572,372,582M |
| 5774 |
572,372,582M |
| 5778 |
572,372,582M |
| 5860 |
572,372,582M |
| 5861 |
372,572,582M |
| 5913 |
584M |
| 5914 |
584M |
| 5916 |
584M |
| 5917 |
584M |
| 5975 |
572,372,582M |
| 5976 |
372,572,582M |
| 6212 |
572,372,582M |
| 6577 |
572,372,582M |
| 6578 |
372,572,582M |
| 6580 |
572,372,582M |
| 6581 |
572,372,582M |
| 9014 |
584M |
| 9015 |
584M |
| 11452 |
599M |
| 11456 |
599M |
| 11457 |
599M |