Query time 0.00284
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "129.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": 108,
"rows_produced_per_join": 108,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (5192,2284,5912,8784,2280,3955,3343,2282,2285,5248,5373,5193,3931,3960,4806,5209,3927,4781,3335,3336))",
"cost_info": {
"read_cost": "42.81",
"eval_cost": "10.80",
"prefix_cost": "53.61",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"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": 108,
"filtered": "100.00",
"cost_info": {
"read_cost": "27.00",
"eval_cost": "10.80",
"prefix_cost": "91.41",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
},
{
"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": 5,
"filtered": "5.00",
"cost_info": {
"read_cost": "27.00",
"eval_cost": "0.54",
"prefix_cost": "129.21",
"data_read_per_join": "16K"
},
"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 |
position |
| 2280 |
341,328,402,250,166,404M |
0 |
| 2282 |
341,328,402,250,166,404M |
0 |
| 2284 |
341,328,402,250,166,404M |
0 |
| 2285 |
341,328,402,250,166,404M |
0 |
| 3335 |
328,402,166,250,481,482M |
0 |
| 3336 |
402,328,250,166,481,482M |
0 |
| 3343 |
545,568,543,546,521,250,166,406,402,328,343M |
0 |
| 3927 |
411,405,402,250,342,328,166,363M |
0 |
| 3931 |
404,328,402,250,166,341M |
0 |
| 3955 |
341,328,402,250,166,404M |
0 |
| 3960 |
404,328,402,250,166,341M |
0 |
| 4781 |
166,402,250,328,564,565M |
0 |
| 4806 |
166,402,250,328,565,564M |
0 |
| 5192 |
166,328,402,250,565,564M |
0 |
| 5193 |
166,402,328,250,564,565M |
0 |
| 5209 |
328,402,407,359,412,166,250,360M |
0 |
| 5248 |
166,250,328,402,359,360,407,412M |
0 |
| 5373 |
360,407,402,250,359,328,166,412M |
0 |
| 5912 |
565,402,250,328,166,564M |
0 |
| 8784 |
542,546,568,343M |
|