Query time 0.00098
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "43.21"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "cscart_product_feature_variants",
"access_type": "range",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"rows_examined_per_scan": 12,
"rows_produced_per_join": 12,
"filtered": "100.00",
"index_condition": "(`cscart`.`cscart_product_feature_variants`.`variant_id` in (1226,1282,1284,1285,1286,1287,1288,1289,1290,1292,1293,1223))",
"cost_info": {
"read_cost": "26.41",
"eval_cost": "2.40",
"prefix_cost": "28.81",
"data_read_per_join": "13K"
},
"used_columns": [
"variant_id",
"color",
"position"
]
}
},
{
"table": {
"table_name": "cscart_product_feature_variant_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscart.cscart_product_feature_variants.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 12,
"filtered": "100.00",
"cost_info": {
"read_cost": "12.00",
"eval_cost": "2.40",
"prefix_cost": "43.21",
"data_read_per_join": "37K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
}
Result
| variant_id |
position |
color |
variant |
| 1284 |
0 |
#ffffff |
Бордово-Белый |
| 1285 |
0 |
#ffffff |
Бордово-Черный |
| 1287 |
0 |
#ffffff |
Желто-Белый |
| 1286 |
0 |
#ffffff |
Желто-Черный |
| 1292 |
0 |
#ffffff |
Желтый |
| 1288 |
0 |
#ffffff |
Зелено-Золотой |
| 1289 |
0 |
#ffffff |
Зелено-Синий |
| 1293 |
0 |
#ffffff |
Зеленый |
| 1282 |
0 |
#ffffff |
Серо-Белый |
| 1290 |
0 |
#ffffff |
Серо-Золотой |
| 1223 |
1 |
#ffffff |
Бежевый |
| 1226 |
2 |
#ffffff |
Красное дерево |