Query time 0.00161
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "24.82"
},
"nested_loop": [
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 27,
"rows_produced_per_join": 27,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.22",
"eval_cost": "2.70",
"prefix_cost": "5.92",
"data_read_per_join": "20K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1536) and (`cscartdb`.`v`.`product_id` in ('69929','69933','69932','69934','69935','69936','69937','69938','69939','69940','69941','69942','69943','69944','69945','69946','69947','69948','69949','69950','69951','69952','69953','69954','69967','69968','69969')))"
}
},
{
"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": 27,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.75",
"eval_cost": "2.70",
"prefix_cost": "15.37",
"data_read_per_join": "81K"
},
"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": 27,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.75",
"eval_cost": "2.70",
"prefix_cost": "24.82",
"data_read_per_join": "30K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
6253 |
69929 |
White |
0 |
#ffffff |
6254 |
69932 |
Black |
1 |
#000000 |
6253 |
69933 |
White |
0 |
#ffffff |
6254 |
69934 |
Black |
1 |
#000000 |
6253 |
69935 |
White |
0 |
#ffffff |
6254 |
69936 |
Black |
1 |
#000000 |
6258 |
69937 |
Glow Green |
1 |
#00ff00 |
6259 |
69938 |
Slime Green |
2 |
#a5ff4a |
6260 |
69939 |
Electro Green |
3 |
#00ff00 |
6255 |
69940 |
Bubblegum Pink |
2 |
#ff6ab5 |
6256 |
69941 |
Baby Pink |
3 |
#ff9fcf |
6257 |
69942 |
Electro Pink |
4 |
#ff0080 |
6258 |
69943 |
Glow Green |
1 |
#00ff00 |
6259 |
69944 |
Slime Green |
2 |
#a5ff4a |
6260 |
69945 |
Electro Green |
3 |
#00ff00 |
6255 |
69946 |
Bubblegum Pink |
2 |
#ff6ab5 |
6256 |
69947 |
Baby Pink |
3 |
#ff9fcf |
6257 |
69948 |
Electro Pink |
4 |
#ff0080 |
6258 |
69949 |
Glow Green |
1 |
#00ff00 |
6259 |
69950 |
Slime Green |
2 |
#a5ff4a |
6260 |
69951 |
Electro Green |
3 |
#00ff00 |
6255 |
69952 |
Bubblegum Pink |
2 |
#ff6ab5 |
6256 |
69953 |
Baby Pink |
3 |
#ff9fcf |
6257 |
69954 |
Electro Pink |
4 |
#ff0080 |
6261 |
69967 |
Candy Corn |
4 |
#eaea00 |
6261 |
69968 |
Candy Corn |
4 |
#eaea00 |
6261 |
69969 |
Candy Corn |
4 |
#eaea00 |