Query time 0.00247
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "45.97"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id",
"fl"
],
"key": "idx_product_feature_variant_id",
"used_key_parts": [
"product_id",
"feature_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 60,
"rows_produced_per_join": 60,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "6.73",
"eval_cost": "6.00",
"prefix_cost": "12.73",
"data_read_per_join": "2K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`cscart_db`.`pfv`.`feature_id` in (67,104,63,178,102)) and (`cscart_db`.`pfv`.`product_id` in (69458,68914,68936,68935,68903,68913,68893,68889,68924,69486,68911,69380)) 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": 8,
"filtered": "13.68",
"cost_info": {
"read_cost": "22.50",
"eval_cost": "0.82",
"prefix_cost": "41.23",
"data_read_per_join": "9K"
},
"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": 8,
"filtered": "100.00",
"cost_info": {
"read_cost": "3.92",
"eval_cost": "0.82",
"prefix_cost": "45.97",
"data_read_per_join": "61K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 63 |
68889 |
10351 |
0 |
South Korea |
| 104 |
68889 |
62203 |
0 |
02 Cherry red |
| 63 |
68893 |
10351 |
0 |
South Korea |
| 104 |
68893 |
62207 |
0 |
06 Sweet potato red |
| 63 |
68903 |
10351 |
0 |
South Korea |
| 104 |
68903 |
62217 |
0 |
02 Plum Berry |
| 63 |
68911 |
10351 |
0 |
South Korea |
| 104 |
68911 |
62224 |
0 |
04 Red Grapefruit Ade |
| 63 |
68913 |
10351 |
0 |
South Korea |
| 104 |
68913 |
62226 |
0 |
06 Pomegranate Ade |
| 63 |
68914 |
10351 |
0 |
South Korea |
| 104 |
68914 |
62227 |
0 |
07 Prune Ade |
| 63 |
68924 |
10351 |
0 |
South Korea |
| 104 |
68924 |
62231 |
0 |
06 Soft Walnut |
| 63 |
68935 |
10351 |
0 |
South Korea |
| 104 |
68935 |
62241 |
0 |
20 Pink Fig |
| 63 |
68936 |
10351 |
0 |
South Korea |
| 104 |
68936 |
62230 |
0 |
05 Midnight Mauve |
| 63 |
69380 |
10351 |
0 |
South Korea |
| 102 |
69380 |
62387 |
0 |
0.15 Oz |
| 178 |
69380 |
62386 |
0 |
Beginner |
| 63 |
69458 |
10351 |
0 |
South Korea |
| 67 |
69458 |
18263 |
0 |
8 |
| 104 |
69458 |
62242 |
0 |
01 Rose Berry |
| 63 |
69486 |
10351 |
0 |
South Korea |
| 67 |
69486 |
19936 |
0 |
6 |
| 104 |
69486 |
62198 |
0 |
02 Soft Mauve |