Query time 0.00137
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` = 1329) and (`cscartdb`.`v`.`product_id` in ('40208','40209','40210','40211','40212','40213','40214','40215','40216','40217','40218','40219','40220','40221','40222','40223','40224','40225','40226','40227','40228','40229','40230','40231')))"
}
},
{
"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 |
5288 |
40208 |
Midnight Black |
0 |
#000000 |
5288 |
40209 |
Midnight Black |
0 |
#000000 |
5288 |
40210 |
Midnight Black |
0 |
#000000 |
5289 |
40211 |
Maroon Red |
1 |
#000000 |
5289 |
40212 |
Maroon Red |
1 |
#000000 |
5289 |
40213 |
Maroon Red |
1 |
#000000 |
5290 |
40214 |
Gold |
2 |
#000000 |
5290 |
40215 |
Gold |
2 |
#000000 |
5290 |
40216 |
Gold |
2 |
#000000 |
5291 |
40217 |
Purple Flame |
3 |
#000000 |
5291 |
40218 |
Purple Flame |
3 |
#000000 |
5291 |
40219 |
Purple Flame |
3 |
#000000 |
5292 |
40220 |
Deepsea Blue |
4 |
#000000 |
5292 |
40221 |
Deepsea Blue |
4 |
#000000 |
5292 |
40222 |
Deepsea Blue |
4 |
#000000 |
5293 |
40223 |
Mint |
5 |
#000000 |
5293 |
40224 |
Mint |
5 |
#000000 |
5293 |
40225 |
Mint |
5 |
#000000 |
5294 |
40226 |
Marble White |
6 |
#000000 |
5294 |
40227 |
Marble White |
6 |
#000000 |
5294 |
40228 |
Marble White |
6 |
#000000 |
5295 |
40229 |
Rose Pink |
7 |
#000000 |
5295 |
40230 |
Rose Pink |
7 |
#000000 |
5295 |
40231 |
Rose Pink |
7 |
#000000 |