Query time 0.00232
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "98.01"
},
"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": 80,
"rows_produced_per_join": 80,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_products_categories`.`product_id` in (3148,3215,3213,3552,3149,3157,5791,3845,3150,2228,3664,2230,2655,2226,5890,3843,3840,5891,2719,5111,3385,3831,3289,3382))",
"cost_info": {
"read_cost": "34.01",
"eval_cost": "8.00",
"prefix_cost": "42.01",
"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": 80,
"filtered": "100.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "8.00",
"prefix_cost": "70.01",
"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": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "20.00",
"eval_cost": "0.40",
"prefix_cost": "98.01",
"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')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 2226 |
424,423,450,166M |
0 |
| 2228 |
166,424,450,423M |
0 |
| 2230 |
424,423,450,166M |
0 |
| 2655 |
423,424,450,166M |
0 |
| 2719 |
423,424,450,166M |
0 |
| 3148 |
423,424,450,166M |
0 |
| 3149 |
423,424,450,166M |
0 |
| 3150 |
423,424,450,166M |
0 |
| 3157 |
423,424,450,166M |
0 |
| 3213 |
450,423,424,166M |
0 |
| 3215 |
450,424,423,166M |
0 |
| 3289 |
450,424,423,166M |
0 |
| 3382 |
423,424,450,166M |
0 |
| 3385 |
423,424,450,166M |
0 |
| 3552 |
423,424,450,166M |
0 |
| 3664 |
423,424,450,166M |
0 |
| 3831 |
423,424,450,166M |
0 |
| 3840 |
423,424,450,166M |
0 |
| 3843 |
423,424,450,166M |
0 |
| 3845 |
423,424,450,166M |
0 |
| 5111 |
450,423,424,166M |
0 |
| 5791 |
450,424,423,166M |
0 |
| 5890 |
423,424,450,166M |
0 |
| 5891 |
423,424,450,166M |
0 |