Query time 0.01131
JSON explain
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "cscart_product_feature_variants.position, cscart_product_feature_variant_descriptions.variant",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "cscart_product_feature_variants",
"access_type": "range",
"possible_keys": ["feature_id"],
"key": "feature_id",
"key_length": "3",
"used_key_parts": ["feature_id"],
"rows": 7,
"filtered": 100,
"index_condition": "cscart_product_feature_variants.feature_id in (549,548)"
}
},
{
"table": {
"table_name": "cscart_product_feature_variant_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["variant_id", "lang_code"],
"ref": ["cscart.cscart_product_feature_variants.variant_id", "const"],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_product_feature_variant_descriptions.lang_code = 'ru')"
}
},
{
"table": {
"table_name": "cscart_product_features_values",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "PRIMARY",
"key_length": "15",
"used_key_parts": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"ref": [
"cscart.cscart_product_feature_variants.feature_id",
"const",
"cscart.cscart_product_feature_variants.variant_id",
"const"
],
"rows": 1,
"filtered": 100,
"attached_condition": "trigcond(cscart_product_features_values.lang_code = 'ru')",
"using_index": true
}
},
{
"table": {
"table_name": "cscart_product_features",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["feature_id"],
"ref": ["cscart.cscart_product_feature_variants.feature_id"],
"rows": 1,
"filtered": 100
}
}
]
}
}
}
}
Result
| variant |
variant_id |
feature_id |
selected |
feature_type |
| S (Маленький) |
1193 |
548 |
|
S |
| Зеленый |
1198 |
549 |
|
S |
| L (Большой) |
1194 |
548 |
|
S |
| Синий |
1199 |
549 |
|
S |
| M (Средний) |
1195 |
548 |
1195 |
S |
| Черный |
1200 |
549 |
|
S |
| Белый |
1201 |
549 |
1201 |
S |
| XL (Очень большой) |
1197 |
548 |
|
S |
| XXL (Супер-большой) |
1196 |
548 |
|
S |