Query time 0.00135
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "61.36"
},
"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": 44,
"rows_produced_per_join": 44,
"filtered": "100.00",
"index_condition": "(`test_uchur_k`.`cscart_products_categories`.`product_id` in (51514,51538,51539,51468,51476,51491,51513,51474,51503,51520,51541,51462,51502,51522,51499,51465,51509,51515,51466,51485,51518,51550,51519,51524,51528,51508,51527,51543,51482,51504,51542,51512,51493,51511,51505,51046,51439,51544,51054,51546,51548,51438,51535))",
"cost_info": {
"read_cost": "26.16",
"eval_cost": "4.40",
"prefix_cost": "30.56",
"data_read_per_join": "704"
},
"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",
"test_uchur_k.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 44,
"filtered": "100.00",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "4.40",
"prefix_cost": "45.96",
"data_read_per_join": "704"
},
"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": [
"test_uchur_k.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "11.00",
"eval_cost": "0.22",
"prefix_cost": "61.36",
"data_read_per_join": "11K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "((`test_uchur_k`.`cscart_categories`.`storefront_id` in (0,1)) and ((`test_uchur_k`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`test_uchur_k`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`test_uchur_k`.`cscart_categories`.`usergroup_ids`))) and (`test_uchur_k`.`cscart_categories`.`status` in ('A','H')))"
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 51046 |
231M |
|
| 51054 |
133M |
|
| 51438 |
395M |
|
| 51439 |
395M |
|
| 51462 |
4M |
|
| 51465 |
4M |
|
| 51466 |
4M |
|
| 51468 |
4M |
|
| 51474 |
117M |
|
| 51476 |
117M |
|
| 51482 |
117M |
|
| 51485 |
4M |
|
| 51491 |
117M |
|
| 51493 |
3M |
|
| 51499 |
83M |
|
| 51502 |
158M |
|
| 51503 |
83M |
|
| 51504 |
83M |
|
| 51505 |
158M |
|
| 51508 |
83M |
|
| 51509 |
193M |
|
| 51511 |
191M |
|
| 51512 |
258M |
|
| 51513 |
258M |
|
| 51514 |
258M |
|
| 51515 |
258M |
|
| 51518 |
35M |
|
| 51519 |
78M |
|
| 51520 |
78M |
|
| 51522 |
78M |
|
| 51524 |
279M |
|
| 51527 |
205M |
|
| 51528 |
205M |
|
| 51535 |
158M |
|
| 51538 |
193M |
|
| 51539 |
193M |
|
| 51541 |
237M |
|
| 51542 |
237M |
|
| 51543 |
237M |
|
| 51544 |
79M |
|
| 51546 |
79M |
|
| 51548 |
81M |
|
| 51550 |
79M |
|