Query time 0.00163
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "38.53"
},
"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": 41,
"rows_produced_per_join": 41,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (10398,10463,11280,6759,10315,7753,6668,6762,6765,6810,7750,10406,10436,10480,10486,10545,11155,11456,6404,6757))",
"cost_info": {
"read_cost": "19.36",
"eval_cost": "4.10",
"prefix_cost": "23.46",
"data_read_per_join": "656"
},
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "10.25",
"eval_cost": "0.21",
"prefix_cost": "37.81",
"data_read_per_join": "6K"
},
"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')))"
}
},
{
"table": {
"table_name": "product_position_source",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"softwarepirmam_hewadelivard_cscart_4.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.51",
"eval_cost": "0.21",
"prefix_cost": "38.53",
"data_read_per_join": "32"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 6404 |
572,372,582M |
0 |
| 6668 |
466,574M |
|
| 6757 |
466,573M |
|
| 6759 |
466M |
|
| 6762 |
466M |
|
| 6765 |
466,573M |
|
| 6810 |
466,574M |
|
| 7750 |
574M |
|
| 7753 |
573M |
|
| 10315 |
372,454,453,190,174,166M |
0 |
| 10398 |
598M |
|
| 10406 |
574M |
|
| 10436 |
587M |
|
| 10463 |
566,597M |
|
| 10480 |
573M |
|
| 10486 |
574M |
|
| 10545 |
579M |
|
| 11155 |
581M |
|
| 11280 |
556,554M |
|
| 11456 |
599M |
|