Query time 0.00086
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "86.12"
},
"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": 98,
"rows_produced_per_join": 98,
"filtered": "100.00",
"index_condition": "(`dbggbern`.`cscart_products_categories`.`product_id` in (7354,7869,3636,7352,4115,3043,7026,7025,7024,7027,6755,6756,6754,5867,5865,5863,5868,5864,5862,5869,6368,6824,5149,6029))",
"cost_info": {
"read_cost": "40.31",
"eval_cost": "9.80",
"prefix_cost": "50.11",
"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": [
"dbggbern.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "5.00",
"cost_info": {
"read_cost": "24.50",
"eval_cost": "0.49",
"prefix_cost": "84.41",
"data_read_per_join": "19K"
},
"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')))"
}
},
{
"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": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.23",
"eval_cost": "0.49",
"prefix_cost": "86.13",
"data_read_per_join": "78"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 3043 |
23,39,7M |
0 |
| 3636 |
23,39,7M |
0 |
| 4115 |
7,39,36M |
0 |
| 5149 |
8,186,187,23,7M |
0 |
| 5862 |
23,9,7M |
0 |
| 5863 |
23,9,7M |
0 |
| 5864 |
23,16,7M |
0 |
| 5865 |
23,16,7M |
0 |
| 5867 |
23,8,349,182,7M |
0 |
| 5868 |
23,167,7M |
0 |
| 5869 |
23,167,7M |
0 |
| 6029 |
22,167,23,7M |
0 |
| 6368 |
23,401,7,8,349,182,1M |
0 |
| 6754 |
23,167,7M |
0 |
| 6755 |
8,23,349,182,7M |
0 |
| 6756 |
16,23,7M |
0 |
| 6824 |
23,39,7M |
0 |
| 7024 |
7,9,23M |
0 |
| 7025 |
16,7,23M |
0 |
| 7026 |
8,349,182,7,23M |
0 |
| 7027 |
167,7,23M |
0 |
| 7352 |
39,187,23,7M |
0 |
| 7354 |
7,39,23M |
0 |
| 7869 |
23,7M |
0 |