Query time 0.00108
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "80.76"
},
"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": 65,
"rows_produced_per_join": 65,
"filtered": "100.00",
"index_condition": "(`dbggbern`.`cscart_products_categories`.`product_id` in (2234,2233,6697,4801,4802,5955,5973,5451,5453,5452,5450,5454,5456,5455,5448,5462,5463,5464,5467,5469,5472,5468,5466,5470))",
"cost_info": {
"read_cost": "28.76",
"eval_cost": "6.50",
"prefix_cost": "35.26",
"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",
"dbggbern.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 65,
"filtered": "100.00",
"cost_info": {
"read_cost": "16.25",
"eval_cost": "6.50",
"prefix_cost": "58.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": [
"dbggbern.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 3,
"filtered": "5.00",
"cost_info": {
"read_cost": "16.25",
"eval_cost": "0.33",
"prefix_cost": "80.76",
"data_read_per_join": "13K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`dbggbern`.`cscart_categories`.`storefront_id` in (0,1)) and ((`dbggbern`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`dbggbern`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`dbggbern`.`cscart_categories`.`usergroup_ids`))) and (`dbggbern`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 2233 |
225,116,59M |
0 |
| 2234 |
225,117,59M |
0 |
| 4801 |
59,349,25,7M |
0 |
| 4802 |
59,349,25,7M |
0 |
| 5448 |
496,59M |
0 |
| 5450 |
496,59M |
0 |
| 5451 |
496,59M |
0 |
| 5452 |
496,59M |
0 |
| 5453 |
496,59M |
0 |
| 5454 |
496,59M |
0 |
| 5455 |
496,59M |
0 |
| 5456 |
496,59M |
0 |
| 5462 |
496,59M |
0 |
| 5463 |
496,59M |
0 |
| 5464 |
496,59M |
0 |
| 5466 |
7,496,500,59M |
0 |
| 5467 |
7,496,500,59M |
0 |
| 5468 |
7,496,500,59M |
0 |
| 5469 |
7,496,500,59M |
0 |
| 5470 |
7,496,500,59M |
0 |
| 5472 |
7,496,500,59M |
0 |
| 5955 |
118,59M |
0 |
| 5973 |
118,59M |
0 |
| 6697 |
610,116,59M |
0 |