Query time 0.00109
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "20.61"
},
"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": 22,
"rows_produced_per_join": 22,
"filtered": "100.00",
"index_condition": "(`chocoramo`.`cscart_products_categories`.`product_id` in (11132,57052,26633,11103,11099,30066,32428,28141,28139,28146,31112,69657))",
"cost_info": {
"read_cost": "10.71",
"eval_cost": "2.20",
"prefix_cost": "12.91",
"data_read_per_join": "352"
},
"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": [
"chocoramo.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "5.50",
"eval_cost": "0.11",
"prefix_cost": "20.61",
"data_read_per_join": "3K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`chocoramo`.`cscart_categories`.`storefront_id` in (0,1)) and ((`chocoramo`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`chocoramo`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`chocoramo`.`cscart_categories`.`usergroup_ids`))) and (`chocoramo`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
product_id |
category_ids |
11099 |
243,828M |
11103 |
243,828M |
11132 |
252,828M |
26633 |
810,828M |
28139 |
831,828M |
28141 |
831,828M |
28146 |
832,828M |
30066 |
831,828M |
31112 |
932,828M |
32428 |
964,828M |
57052 |
1351,828M |
69657 |
1473,828M |