Query time 0.00145
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "22.09"
},
"nested_loop": [
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id"
],
"key_length": "6",
"rows_examined_per_scan": 24,
"rows_produced_per_join": 24,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.89",
"eval_cost": "2.40",
"prefix_cost": "5.29",
"data_read_per_join": "18K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1330) and (`cscartdb`.`v`.`product_id` in ('40812','40813','40814','40815','40816','40817','40818','40819','40820','40821','40822','40823','40824','40825','40826','40827','40828','40829','40830','40831','40832','40833','40834','40835')))"
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscartdb.v.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 24,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "2.40",
"prefix_cost": "13.69",
"data_read_per_join": "72K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "vf",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscartdb.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 24,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "2.40",
"prefix_cost": "22.09",
"data_read_per_join": "27K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
5296 |
40812 |
6" |
0 |
#000000 |
5297 |
40813 |
7" |
1 |
#000000 |
5298 |
40814 |
8" |
2 |
#000000 |
5296 |
40815 |
6" |
0 |
#000000 |
5297 |
40816 |
7" |
1 |
#000000 |
5298 |
40817 |
8" |
2 |
#000000 |
5296 |
40818 |
6" |
0 |
#000000 |
5297 |
40819 |
7" |
1 |
#000000 |
5298 |
40820 |
8" |
2 |
#000000 |
5296 |
40821 |
6" |
0 |
#000000 |
5297 |
40822 |
7" |
1 |
#000000 |
5298 |
40823 |
8" |
2 |
#000000 |
5296 |
40824 |
6" |
0 |
#000000 |
5297 |
40825 |
7" |
1 |
#000000 |
5298 |
40826 |
8" |
2 |
#000000 |
5296 |
40827 |
6" |
0 |
#000000 |
5297 |
40828 |
7" |
1 |
#000000 |
5298 |
40829 |
8" |
2 |
#000000 |
5296 |
40830 |
6" |
0 |
#000000 |
5297 |
40831 |
7" |
1 |
#000000 |
5298 |
40832 |
8" |
2 |
#000000 |
5296 |
40833 |
6" |
0 |
#000000 |
5297 |
40834 |
7" |
1 |
#000000 |
5298 |
40835 |
8" |
2 |
#000000 |