Query time 0.00261
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "73.04"
},
"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": 82,
"rows_produced_per_join": 82,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3489,3798,3927,4781,5045,2720,3281,3335,2194,2223,2321,2734,3369,3336,3407,3807,4162,4592,2386,2392,2786,3364,3954,8266))",
"cost_info": {
"read_cost": "34.71",
"eval_cost": "8.20",
"prefix_cost": "42.91",
"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": "20.50",
"eval_cost": "0.41",
"prefix_cost": "71.61",
"data_read_per_join": "12K"
},
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.03",
"eval_cost": "0.41",
"prefix_cost": "73.05",
"data_read_per_join": "65"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 2194 |
426,423,166M |
0 |
| 2223 |
424,423,452,166M |
0 |
| 2321 |
166,378,379M |
0 |
| 2386 |
166,378,379M |
0 |
| 2392 |
166,378,379M |
0 |
| 2720 |
423,424,450,166M |
0 |
| 2734 |
329,166,457M |
0 |
| 2786 |
329,166,344M |
0 |
| 3281 |
417,332,245,166,329,399,524M |
0 |
| 3335 |
328,402,166,250,481,482M |
0 |
| 3336 |
402,328,250,166,481,482M |
0 |
| 3364 |
452,424,423,166,492M |
0 |
| 3369 |
329,166,457M |
0 |
| 3407 |
423,424,451,166M |
0 |
| 3489 |
167,166,354M |
0 |
| 3798 |
166,423,449M |
0 |
| 3807 |
423,424,450,166M |
0 |
| 3927 |
411,405,402,250,342,328,166,363M |
0 |
| 3954 |
341,328,402,250,166,404M |
0 |
| 4162 |
167,166,353M |
0 |
| 4592 |
513,166,515M |
0 |
| 4781 |
166,402,250,328,564,565M |
0 |
| 5045 |
234,166,559M |
0 |
| 8266 |
454,190M |
|