Query time 0.00514
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "152.09"
},
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"link_type",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 70,
"rows_produced_per_join": 70,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "7.97",
"eval_cost": "7.00",
"prefix_cost": "14.97",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`maniamall_cscart`.`cscart_products_categories`.`product_id` in (480519,596382,697795,1108774,386215,589116,1732209,590365,589122,611344,524885,590294,590359,503738,611343,1114057,611248,1108257,1232917,589813,697874,592084,612918,592827,1232953,589079,697492,1233035,594419,1108259,696364,588450,596346,697773,594204,594003))"
}
},
{
"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",
"maniamall_cscart.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 70,
"filtered": "100.00",
"cost_info": {
"read_cost": "69.46",
"eval_cost": "7.00",
"prefix_cost": "91.42",
"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": [
"maniamall_cscart.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "53.67",
"eval_cost": "0.35",
"prefix_cost": "152.09",
"data_read_per_join": "9K"
},
"used_columns": [
"category_id",
"company_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`maniamall_cscart`.`cscart_categories`.`company_id` = 1) and ((`maniamall_cscart`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`maniamall_cscart`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`maniamall_cscart`.`cscart_categories`.`usergroup_ids`))) and (`maniamall_cscart`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 386215 |
4528,6634,7379 |
|
| 480519 |
4528,14541,1571M |
|
| 503738 |
4528,5287,2790M |
|
| 524885 |
4528,7127M |
|
| 588450 |
8182M |
|
| 589079 |
8327M |
|
| 589116 |
8203M |
|
| 589122 |
8331M |
|
| 589813 |
8267M |
|
| 590294 |
8388M |
|
| 590359 |
8392M |
|
| 590365 |
8392M |
|
| 592084 |
8486M |
|
| 592827 |
8509M |
|
| 594003 |
8464M |
|
| 594204 |
8207M |
|
| 594419 |
43883M |
|
| 596346 |
8198M |
|
| 596382 |
8619M |
|
| 611248 |
32420,7898M |
|
| 611343 |
32420,7907M |
|
| 611344 |
32420,7907M |
|
| 612918 |
32420,42631,3279M |
|
| 696364 |
7891M |
|
| 697492 |
32420,8091M |
|
| 697773 |
32420,3126M |
|
| 697795 |
32420,3288M |
|
| 697874 |
8148M |
|
| 1108257 |
4528,32420,42631,28024M |
|
| 1108259 |
4528,32420,42631,42632,28024M |
|
| 1108774 |
4528,16839,32420,3303M |
|
| 1114057 |
4528,41361,42631,42632,6795M |
|
| 1232917 |
4528,16883M |
|
| 1232953 |
4528,42632,16840M |
|
| 1233035 |
16883M |
|
| 1732209 |
32420,3286M |
|