Query time 0.00138
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "20.13"
},
"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": 35,
"rows_produced_per_join": 35,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.77",
"eval_cost": "3.50",
"prefix_cost": "7.27",
"data_read_per_join": "560"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (85548,85558,92838,92839,92895,92896,92897,92898,92899,92900,92901,92902,92903,92904,92905,92906,92907,92908,92909,92910,92911,92912,92934,92935,92936,92937,92938,92939,92940,92941))"
}
},
{
"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": [
"nuie_scalesta_net.cscart_products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "8.75",
"eval_cost": "0.18",
"prefix_cost": "19.52",
"data_read_per_join": "4K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "((`nuie_scalesta_net`.`cscart_categories`.`storefront_id` in (0,1)) and ((`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`nuie_scalesta_net`.`cscart_categories`.`usergroup_ids`))) and (`nuie_scalesta_net`.`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",
"nuie_scalesta_net.cscart_products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.44",
"eval_cost": "0.18",
"prefix_cost": "20.13",
"data_read_per_join": "28"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 85548 |
7341,7342,7343,7157M |
|
| 85558 |
7313,7338,7219M |
|
| 92838 |
7186M |
|
| 92839 |
7185M |
|
| 92895 |
7186M |
|
| 92896 |
7186M |
|
| 92897 |
7185M |
|
| 92898 |
7185M |
|
| 92899 |
7186M |
|
| 92900 |
7185M |
|
| 92901 |
7186M |
|
| 92902 |
7186M |
|
| 92903 |
7185M |
|
| 92904 |
7185M |
|
| 92905 |
7186M |
|
| 92906 |
7186M |
|
| 92907 |
7185M |
|
| 92908 |
7185M |
|
| 92909 |
7186M |
|
| 92910 |
7186M |
|
| 92911 |
7185M |
|
| 92912 |
7185M |
|
| 92934 |
7186M |
|
| 92935 |
7185M |
|
| 92936 |
7186M |
|
| 92937 |
7185M |
|
| 92938 |
7186M |
|
| 92939 |
7185M |
|
| 92940 |
7186M |
|
| 92941 |
7185M |
|