Query time 0.00092
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "8.44"
},
"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": 9,
"rows_produced_per_join": 9,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.24",
"eval_cost": "0.90",
"prefix_cost": "2.14",
"data_read_per_join": "6K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1204) and (`cscartdb`.`v`.`product_id` in ('36054','36057','36056','36055','36053','36052','36051','36050','36025')))"
}
},
{
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.25",
"eval_cost": "0.90",
"prefix_cost": "5.29",
"data_read_per_join": "27K"
},
"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": 9,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.25",
"eval_cost": "0.90",
"prefix_cost": "8.44",
"data_read_per_join": "10K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
4670 |
36025 |
Small narrow tee |
0 |
#000000 |
4671 |
36050 |
Medium narrow tee |
1 |
#000000 |
4672 |
36051 |
Large narrow tee |
2 |
#000000 |
4673 |
36052 |
1X "Ooof" narrow tee |
3 |
#000000 |
4674 |
36053 |
2X "Blaster" narrow tee |
4 |
#000000 |
4675 |
36054 |
3X "Wreckum" narrow tee |
5 |
#000000 |
4676 |
36055 |
4X "Insanity" narrow tee |
6 |
#000000 |
4677 |
36056 |
5X "Destroyer" narrow tee |
7 |
#000000 |
4678 |
36057 |
6X "Annihlator" narrow tee |
8 |
#000000 |