SELECT 
  cscart_product_feature_variant_descriptions.variant, 
  cscart_product_feature_variants.variant_id, 
  cscart_product_feature_variants.feature_id, 
  cscart_product_features_values.variant_id as selected, 
  cscart_product_features.feature_type, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path 
FROM 
  cscart_product_feature_variants 
  LEFT JOIN cscart_product_feature_variant_descriptions ON cscart_product_feature_variant_descriptions.variant_id = cscart_product_feature_variants.variant_id 
  AND cscart_product_feature_variant_descriptions.lang_code = 'en' 
  INNER JOIN cscart_product_features_values ON cscart_product_features_values.variant_id = cscart_product_feature_variants.variant_id 
  AND cscart_product_features_values.lang_code = 'en' 
  AND cscart_product_features_values.product_id = 224454 
  AND cscart_product_features_values.feature_id = cscart_product_feature_variants.feature_id 
  LEFT JOIN cscart_product_features ON cscart_product_features.feature_id = cscart_product_feature_variants.feature_id 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = cscart_product_feature_variants.variant_id 
  AND cscart_seo_names.type = 'e' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
WHERE 
  1 
  AND cscart_product_feature_variants.feature_id IN (
    741, 835, 834, 837, 838, 839, 840, 841, 
    842, 843, 844, 845, 846, 847, 848, 849, 
    850, 851, 852, 853, 854, 855, 856
  ) 
GROUP BY 
  cscart_product_feature_variants.variant_id 
ORDER BY 
  cscart_product_feature_variants.position, 
  cscart_product_feature_variant_descriptions.variant

Query time 0.00996

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "28.58"
    },
    "ordering_operation": {
      "using_filesort": true,
      "grouping_operation": {
        "using_temporary_table": true,
        "using_filesort": false,
        "nested_loop": [
          {
            "table": {
              "table_name": "cscart_product_features_values",
              "access_type": "range",
              "possible_keys": [
                "PRIMARY",
                "fl",
                "variant_id",
                "lang_code",
                "product_id",
                "fpl",
                "idx_product_feature_variant_id"
              ],
              "key": "idx_product_feature_variant_id",
              "used_key_parts": [
                "product_id",
                "feature_id",
                "lang_code"
              ],
              "key_length": "12",
              "rows_examined_per_scan": 135,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "using_index": true,
              "cost_info": {
                "read_cost": "1.49",
                "eval_cost": "0.01",
                "prefix_cost": "28.49",
                "data_read_per_join": "54"
              },
              "used_columns": [
                "feature_id",
                "product_id",
                "variant_id",
                "lang_code"
              ],
              "attached_condition": "((`webmarco`.`cscart_product_features_values`.`product_id` = 224454) and (`webmarco`.`cscart_product_features_values`.`feature_id` in (741,835,834,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856)) and (`webmarco`.`cscart_product_features_values`.`lang_code` = 'en'))"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_feature_variants",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY",
                "feature_id",
                "position"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "variant_id"
              ],
              "key_length": "3",
              "ref": [
                "webmarco.cscart_product_features_values.variant_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "5.00",
              "cost_info": {
                "read_cost": "0.07",
                "eval_cost": "0.00",
                "prefix_cost": "28.57",
                "data_read_per_join": "3"
              },
              "used_columns": [
                "variant_id",
                "feature_id",
                "position"
              ],
              "attached_condition": "(`webmarco`.`cscart_product_feature_variants`.`feature_id` = `webmarco`.`cscart_product_features_values`.`feature_id`)"
            }
          },
          {
            "table": {
              "table_name": "cscart_product_features",
              "access_type": "eq_ref",
              "possible_keys": [
                "PRIMARY"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "feature_id"
              ],
              "key_length": "3",
              "ref": [
                "webmarco.cscart_product_features_values.feature_id"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.00",
                "prefix_cost": "28.58",
                "data_read_per_join": "1"
              },
              "used_columns": [
                "feature_id",
                "feature_type"
              ]
            }
          },
          {
            "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": [
                "webmarco.cscart_product_features_values.variant_id",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.00",
                "prefix_cost": "28.58",
                "data_read_per_join": "15"
              },
              "used_columns": [
                "variant_id",
                "variant",
                "lang_code"
              ]
            }
          },
          {
            "table": {
              "table_name": "cscart_seo_names",
              "access_type": "ref",
              "possible_keys": [
                "PRIMARY",
                "dispatch"
              ],
              "key": "PRIMARY",
              "used_key_parts": [
                "object_id",
                "type",
                "dispatch",
                "lang_code"
              ],
              "key_length": "206",
              "ref": [
                "webmarco.cscart_product_features_values.variant_id",
                "const",
                "const",
                "const"
              ],
              "rows_examined_per_scan": 1,
              "rows_produced_per_join": 0,
              "filtered": "100.00",
              "cost_info": {
                "read_cost": "0.00",
                "eval_cost": "0.00",
                "prefix_cost": "28.58",
                "data_read_per_join": "5"
              },
              "used_columns": [
                "name",
                "object_id",
                "company_id",
                "type",
                "dispatch",
                "path",
                "lang_code"
              ]
            }
          }
        ]
      }
    }
  }
}

Result

variant variant_id feature_id selected feature_type seo_name seo_path
Chieti (CH) 59777 837 59777 M
Italy 59704 835 59704 M
L'AQUILA (AQ) 59778 837 59778 M
Pescara (PE) 59779 837 59779 M
Teramo (TE) 59780 837 59780 M
Veneto 61614 853 61614 M
Abruzzo 59741 834 59741 M
Agrigento 59911 851 59911 M
Alessandria 59890 848 59890 M
Ancona 59882 846 59882 M
Andria 59898 849 59898 M
Aosta 59934 855 59934 M
Arezzo 59922 853 59922 M
Avellino 59842 840 59842 M
Belluno 59935 856 59935 M
Bergamo 59870 845 59870 M
Bologna 59847 841 59847 M
Bolzano 59920 852 59920 M
Cagliari 59906 850 59906 M
Campobasso 59888 847 59888 M
Catanzaro 59834 839 59834 M
Frosinone 59861 843 59861 M
Genova 59866 844 59866 M
Gorizia 59857 842 59857 M
Matera 59832 838 59832 M
Perugia 59932 854 59932 M
Ascoli Piceno 59883 846 59883 M
Asti 59891 848 59891 M
BARI 59899 849 59899 M
Basilicata 59742 834 59742 M
Benevento 59843 840 59843 M
Brescia 59871 845 59871 M
Caltanissetta 59912 851 59912 M
Carbonia 59907 850 59907 M
Cesena 59848 841 59848 M
Cosenza 59835 839 59835 M
Firenze 59923 853 59923 M
Imperia 59867 844 59867 M
Isernia 59889 847 59889 M
Latina 59862 843 59862 M
Padova 59936 856 59936 M
Pordenone 59858 842 59858 M
Potenza 59833 838 59833 M
Terni 59933 854 59933 M
Trento 59921 852 59921 M
Barletta 59900 849 59900 M
Biella 59892 848 59892 M
Calabria 59743 834 59743 M
Caserta 59844 840 59844 M
Catania 59913 851 59913 M
Como 59872 845 59872 M
Crotone 59836 839 59836 M
Fermo 59884 846 59884 M
Ferrara 59849 841 59849 M
Grosseto 59924 853 59924 M
La Spezia 59868 844 59868 M
Nuoro 59908 850 59908 M
Rieti 59863 843 59863 M
Rovigo 59937 856 59937 M
Trieste 59859 842 59859 M
Brindisi 59901 849 59901 M
Campania 59744 834 59744 M
Cremona 59873 845 59873 M
Cuneo 59893 848 59893 M
Enna 59914 851 59914 M
Forlì 59850 841 59850 M
Livorno 59925 853 59925 M
Macerata 59885 846 59885 M
Napoli 59845 840 59845 M
Oristano 59909 850 59909 M
Reggio Calabria 59837 839 59837 M
ROMA 59864 843 59864 M
Savona 59869 844 59869 M
Treviso 59938 856 59938 M
Udine 59860 842 59860 M
Emilia-Romagna 59745 834 59745 M
Foggia 59902 849 59902 M
Lecco 59874 845 59874 M
Lucca 59926 853 59926 M
Messina 59915 851 59915 M
Modena 59851 841 59851 M
Novara 59894 848 59894 M
Pesaro 59886 846 59886 M
Salerno 59846 840 59846 M
Sassari 59910 850 59910 M
Vibo Valentia 59838 839 59838 M
Viterbo 59865 843 59865 M
Friuli Venezia Giulia 59746 834 59746 M
Lecce 59903 849 59903 M
Lodi 59875 845 59875 M
Massa 59927 853 59927 M
Palermo 59916 851 59916 M
Parma 59852 841 59852 M
Torino 59895 848 59895 M
Urbino 59887 846 59887 M
Venezia 59939 856 59939 M
Lazio 59747 834 59747 M
Mantova 59876 845 59876 M
Piacenza 59853 841 59853 M
Pisa 59928 853 59928 M
Ragusa 59917 851 59917 M
Taranto 59904 849 59904 M
Verbania 59896 848 59896 M
Verona 59940 856 59940 M
Liguria 59748 834 59748 M
MILANO 59877 845 59877 M
Pistoia 59929 853 59929 M
Ravenna 59854 841 59854 M
Siracusa 59918 851 59918 M
Trani 59905 849 59905 M
Vercelli 59897 848 59897 M
Vicenza 59941 856 59941 M
Lombardia 59749 834 59749 M
Monza 59878 845 59878 M
Prato 59930 853 59930 M
Reggio Emilia 59855 841 59855 M
Trapani 59919 851 59919 M
Marche 59750 834 59750 M
Pavia 59879 845 59879 M
Rimini 59856 841 59856 M
Siena 59931 853 59931 M
Molise 59751 834 59751 M
Sondrio 59880 845 59880 M
Piemonte 59752 834 59752 M
Varese 59881 845 59881 M
Puglia 59753 834 59753 M
Sardegna 59754 834 59754 M
Sicilia 59755 834 59755 M
Toscana 59756 834 59756 M
Trentino-Alto Adige 59757 834 59757 M
Umbria 59758 834 59758 M
Valle d'Aosta 59759 834 59759 M
Veneto 59760 834 59760 M
Roma 59763 834 59763 M
Car Rental 38299 741 38299 M