Query time 0.00231
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": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_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` = 1435) and (`cscartdb`.`v`.`product_id` in ('60875','60941','60942','60943','60944','60945','60946','60947','60948','60949','60950','60951','60952','60953','60954','60955','60956','60957','60958','60959','60960','60961','60962','60963')))"
}
},
{
"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 |
5772 |
60875 |
Small |
0 |
#000000 |
5772 |
60941 |
Small |
0 |
#000000 |
5772 |
60942 |
Small |
0 |
#000000 |
5773 |
60943 |
Medium |
1 |
#000000 |
5773 |
60944 |
Medium |
1 |
#000000 |
5773 |
60945 |
Medium |
1 |
#000000 |
5774 |
60946 |
Large |
2 |
#000000 |
5774 |
60947 |
Large |
2 |
#000000 |
5774 |
60948 |
Large |
2 |
#000000 |
5775 |
60949 |
Extra Large |
3 |
#000000 |
5775 |
60950 |
Extra Large |
3 |
#000000 |
5775 |
60951 |
Extra Large |
3 |
#000000 |
5772 |
60952 |
Small |
0 |
#000000 |
5772 |
60953 |
Small |
0 |
#000000 |
5772 |
60954 |
Small |
0 |
#000000 |
5773 |
60955 |
Medium |
1 |
#000000 |
5773 |
60956 |
Medium |
1 |
#000000 |
5773 |
60957 |
Medium |
1 |
#000000 |
5774 |
60958 |
Large |
2 |
#000000 |
5774 |
60959 |
Large |
2 |
#000000 |
5774 |
60960 |
Large |
2 |
#000000 |
5775 |
60961 |
Extra Large |
3 |
#000000 |
5775 |
60962 |
Extra Large |
3 |
#000000 |
5775 |
60963 |
Extra Large |
3 |
#000000 |