Query time 0.00198
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "7.28"
},
"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": "product_id",
"used_key_parts": [
"product_id",
"feature_id"
],
"key_length": "6",
"rows_examined_per_scan": 27,
"rows_produced_per_join": 2,
"filtered": "10.00",
"using_index": true,
"cost_info": {
"read_cost": "6.02",
"eval_cost": "0.27",
"prefix_cost": "6.29",
"data_read_per_join": "2K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`cscart_db`.`pfv`.`feature_id` in (74,68,104)) and (`cscart_db`.`pfv`.`product_id` in (21552,21553,21554,27330,27331,27332,28595,28596,28597)) and (`cscart_db`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id",
"variant_feature_idx",
"idx_var_feat_pos"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"cscart_db.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.68",
"eval_cost": "0.01",
"prefix_cost": "7.23",
"data_read_per_join": "157"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`cscart_db`.`fv`.`feature_id` = `cscart_db`.`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": [
"cscart_db.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "7.28",
"data_read_per_join": "1K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 68 |
21552 |
33558 |
0 |
10
|
| 74 |
21552 |
19150 |
0 |
Single |
| 104 |
21552 |
41125 |
0 |
Dew |
| 68 |
21553 |
19622 |
0 |
10 |
| 74 |
21553 |
19150 |
0 |
Single |
| 104 |
21553 |
41126 |
0 |
Bubblegum |
| 68 |
21554 |
19622 |
0 |
10 |
| 74 |
21554 |
19150 |
0 |
Single |
| 104 |
21554 |
41127 |
0 |
Maple |
| 68 |
27330 |
21493 |
0 |
4 |
| 74 |
27330 |
19150 |
0 |
Single |
| 104 |
27330 |
43514 |
0 |
Pretty Chill |
| 68 |
27331 |
21493 |
0 |
4 |
| 74 |
27331 |
19150 |
0 |
Single |
| 104 |
27331 |
43515 |
0 |
Pretty Extra |
| 68 |
27332 |
21493 |
0 |
4 |
| 74 |
27332 |
19150 |
0 |
Single |
| 104 |
27332 |
43517 |
0 |
Pretty Woke |
| 68 |
28595 |
21493 |
0 |
4 |
| 74 |
28595 |
22007 |
0 |
Single |
| 104 |
28595 |
44755 |
0 |
Candy Remix |
| 68 |
28596 |
21493 |
0 |
4 |
| 74 |
28596 |
19150 |
0 |
Single |
| 104 |
28596 |
44758 |
0 |
Chocolate Granola |
| 68 |
28597 |
21493 |
0 |
4 |
| 74 |
28597 |
19150 |
0 |
Single |
| 104 |
28597 |
44760 |
0 |
Dimond Paste |