Query time 0.00203
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "22.09"
},
"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": 24,
"rows_produced_per_join": 24,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2.89",
"eval_cost": "2.40",
"prefix_cost": "5.29",
"data_read_per_join": "18K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id"
],
"attached_condition": "((`cscartdb`.`v`.`feature_id` = 1330) and (`cscartdb`.`v`.`product_id` in ('40787','40788','40789','40790','40791','40792','40793','40794','40795','40796','40797','40798','40799','40800','40801','40802','40803','40804','40805','40806','40807','40808','40809','40810')))"
}
},
{
"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": 24,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "2.40",
"prefix_cost": "13.69",
"data_read_per_join": "72K"
},
"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": 24,
"filtered": "100.00",
"cost_info": {
"read_cost": "6.00",
"eval_cost": "2.40",
"prefix_cost": "22.09",
"data_read_per_join": "27K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
}
]
}
}
Result
variant_id |
product_id |
variant |
position |
color |
5296 |
40787 |
6" |
0 |
#000000 |
5297 |
40788 |
7" |
1 |
#000000 |
5298 |
40789 |
8" |
2 |
#000000 |
5296 |
40790 |
6" |
0 |
#000000 |
5297 |
40791 |
7" |
1 |
#000000 |
5298 |
40792 |
8" |
2 |
#000000 |
5296 |
40793 |
6" |
0 |
#000000 |
5297 |
40794 |
7" |
1 |
#000000 |
5298 |
40795 |
8" |
2 |
#000000 |
5296 |
40796 |
6" |
0 |
#000000 |
5297 |
40797 |
7" |
1 |
#000000 |
5298 |
40798 |
8" |
2 |
#000000 |
5296 |
40799 |
6" |
0 |
#000000 |
5297 |
40800 |
7" |
1 |
#000000 |
5298 |
40801 |
8" |
2 |
#000000 |
5296 |
40802 |
6" |
0 |
#000000 |
5297 |
40803 |
7" |
1 |
#000000 |
5298 |
40804 |
8" |
2 |
#000000 |
5296 |
40805 |
6" |
0 |
#000000 |
5297 |
40806 |
7" |
1 |
#000000 |
5298 |
40807 |
8" |
2 |
#000000 |
5296 |
40808 |
6" |
0 |
#000000 |
5297 |
40809 |
7" |
1 |
#000000 |
5298 |
40810 |
8" |
2 |
#000000 |