Query time 0.00100
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.26"
},
"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": 11,
"rows_produced_per_join": 11,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.46",
"eval_cost": "1.10",
"prefix_cost": "2.56",
"data_read_per_join": "8K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1252) and (`cscartdb`.`v`.`product_id` in ('36031','37336','37335','37337','37333','37332','37334','37330','37331','37339','37338')))"
}
},
{
"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": 11,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.75",
"eval_cost": "1.10",
"prefix_cost": "6.41",
"data_read_per_join": "33K"
},
"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": 11,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.75",
"eval_cost": "1.10",
"prefix_cost": "10.26",
"data_read_per_join": "12K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
4900 |
36031 |
1.0" |
0 |
#000000 |
4901 |
37330 |
1.2" |
1 |
#000000 |
4902 |
37331 |
1.4" |
2 |
#000000 |
4903 |
37332 |
1.6" |
3 |
#000000 |
4904 |
37333 |
1.8" |
4 |
#000000 |
4905 |
37334 |
2.0" |
5 |
#000000 |
4906 |
37335 |
2.2" |
6 |
#000000 |
4907 |
37336 |
2.4" |
7 |
#000000 |
4908 |
37337 |
2.6" |
8 |
#000000 |
4909 |
37338 |
2.8" |
9 |
#000000 |
4910 |
37339 |
3.0" |
10 |
#000000 |