Query time 0.00143
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.52"
},
"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": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "5.08",
"eval_cost": "4.80",
"prefix_cost": "9.88",
"data_read_per_join": "768"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
],
"attached_condition": "(`nuie_scalesta_net`.`cscart_products_categories`.`product_id` in (97900,97901,97902,97915,97916,97917,97918,97919,97920,97921,97922,97923,97924,97925,97926,97927,97928,97929,97930,97931,97932,97933,97934,97947,97948,97949,97950,97951,97960,97961,97964,97965,97966,97969,97974,97976,97977,97980,97981,97984,97985,98040,98042,98044,98046,98048,98050,98085))"
}
},
{
"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": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "0.24",
"prefix_cost": "26.68",
"data_read_per_join": "6K"
},
"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": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.60",
"eval_cost": "0.24",
"prefix_cost": "27.52",
"data_read_per_join": "38"
},
"used_columns": [
"product_id",
"category_id",
"position"
]
}
}
]
}
}
}
Result
| product_id |
category_ids |
position |
| 97900 |
7186M |
0 |
| 97901 |
7186M |
0 |
| 97902 |
7186M |
0 |
| 97915 |
7186M |
0 |
| 97916 |
7186M |
0 |
| 97917 |
7186M |
0 |
| 97918 |
7186M |
0 |
| 97919 |
7186M |
0 |
| 97920 |
7186M |
0 |
| 97921 |
7186M |
0 |
| 97922 |
7186M |
0 |
| 97923 |
7186M |
0 |
| 97924 |
7186M |
0 |
| 97925 |
7186M |
0 |
| 97926 |
7186M |
0 |
| 97927 |
7186M |
0 |
| 97928 |
7186M |
0 |
| 97929 |
7186M |
0 |
| 97930 |
7186M |
0 |
| 97931 |
7186M |
0 |
| 97932 |
7186M |
0 |
| 97933 |
7186M |
0 |
| 97934 |
7186M |
0 |
| 97947 |
7186M |
0 |
| 97948 |
7186M |
0 |
| 97949 |
7186M |
0 |
| 97950 |
7186M |
0 |
| 97951 |
7186M |
0 |
| 97960 |
7186M |
0 |
| 97961 |
7186M |
0 |
| 97964 |
7186M |
0 |
| 97965 |
7186M |
0 |
| 97966 |
7186M |
0 |
| 97969 |
7186M |
0 |
| 97974 |
7186M |
0 |
| 97976 |
7186M |
0 |
| 97977 |
7186M |
0 |
| 97980 |
7186M |
0 |
| 97981 |
7186M |
0 |
| 97984 |
7186M |
0 |
| 97985 |
7186M |
0 |
| 98040 |
7186M |
0 |
| 98042 |
7186M |
0 |
| 98044 |
7186M |
0 |
| 98046 |
7186M |
0 |
| 98048 |
7186M |
0 |
| 98050 |
7186M |
0 |
| 98085 |
7186M |
0 |