Query time 0.00217
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "26.81"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 46,
"rows_produced_per_join": 45,
"filtered": "99.99",
"using_index": true,
"cost_info": {
"read_cost": "5.31",
"eval_cost": "4.60",
"prefix_cost": "9.91",
"data_read_per_join": "35K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`cscartdb`.`pfv`.`feature_id` in (306,361)) and (`cscartdb`.`pfv`.`product_id` in (17070,17075,17096,17062,17076,17130,17071,17108,17066,17131,17106,21169,17104,17087,17095,17114,17135,21147,17127,21140,21086,17126,17084)) and (`cscartdb`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscartdb.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "11.50",
"eval_cost": "0.23",
"prefix_cost": "26.01",
"data_read_per_join": "2K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`cscartdb`.`fv`.`feature_id` = `cscartdb`.`pfv`.`feature_id`)"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscartdb.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.57",
"eval_cost": "0.23",
"prefix_cost": "26.81",
"data_read_per_join": "6K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
306 |
17062 |
1353 |
0 |
Small |
306 |
17066 |
1353 |
0 |
Small |
306 |
17070 |
1353 |
0 |
Small |
306 |
17071 |
1353 |
0 |
Small |
306 |
17075 |
1353 |
0 |
Small |
306 |
17076 |
1353 |
0 |
Small |
306 |
17084 |
1353 |
0 |
Small |
306 |
17087 |
1353 |
0 |
Small |
306 |
17095 |
1353 |
0 |
Small |
306 |
17096 |
1353 |
0 |
Small |
306 |
17104 |
1353 |
0 |
Small |
306 |
17106 |
1353 |
0 |
Small |
306 |
17108 |
1353 |
0 |
Small |
306 |
17114 |
1353 |
0 |
Small |
306 |
17126 |
1353 |
0 |
Small |
306 |
17127 |
1353 |
0 |
Small |
306 |
17130 |
1353 |
0 |
Small |
306 |
17131 |
1353 |
0 |
Small |
306 |
17135 |
1353 |
0 |
Small |
306 |
21086 |
1357 |
4 |
1X |
361 |
21140 |
1814 |
1 |
XS |
361 |
21147 |
1814 |
1 |
XS |
361 |
21169 |
1814 |
1 |
XS |