SELECT 
  f.feature_id, 
  f.purpose, 
  p.product_id, 
  p.parent_product_id, 
  g.id, 
  g.code 
FROM 
  cscart_product_variation_group_features AS f 
  INNER JOIN cscart_product_variation_groups AS g ON f.group_id = g.id 
  INNER JOIN cscart_product_variation_group_products AS p ON f.group_id = p.group_id 
WHERE 
  p.product_id IN (
    1818, 1819, 3744, 3745, 3746, 3747, 5461, 
    5462, 5463, 5464, 5465, 5466, 5467, 
    5468, 5469, 5470, 5471, 5472, 5473, 
    5474, 5475, 5476, 5477, 5478, 5479, 
    5480, 5481, 5482, 5483, 5484, 5485, 
    5486, 5487, 5488, 5489, 5490, 5491, 
    5492, 5493, 5494, 5495, 5496, 5497, 
    5498, 5499, 5500, 5501, 5502, 5503, 
    5504, 5163, 5153, 1419, 1420, 1421, 
    3157, 5132, 5133, 5134, 5135, 1452, 
    5161, 1442, 5151, 6734, 6733, 6729, 
    6710, 1721, 1722, 1723, 1724, 1725, 
    1726, 1727, 1728, 1729, 1730, 1731, 
    1732, 1733, 1734, 1735, 1736, 1737, 
    1738, 1739, 1740, 1741, 1742, 1743, 
    1744, 1745, 1746, 1747, 1748
  )

Query time 0.00068

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "336.01"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "p",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY",
            "idx_group_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "rows_examined_per_scan": 96,
          "rows_produced_per_join": 96,
          "filtered": "100.00",
          "index_condition": "(`test2_gaseus`.`p`.`product_id` in (1818,1819,3744,3745,3746,3747,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488,5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5163,5153,1419,1420,1421,3157,5132,5133,5134,5135,1452,5161,1442,5151,6734,6733,6729,6710,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748))",
          "cost_info": {
            "read_cost": "57.61",
            "eval_cost": "9.60",
            "prefix_cost": "67.21",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "product_id",
            "parent_product_id",
            "group_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "3",
          "ref": [
            "test2_gaseus.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 96,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "24.00",
            "eval_cost": "9.60",
            "prefix_cost": "100.81",
            "data_read_per_join": "37K"
          },
          "used_columns": [
            "id",
            "code"
          ]
        }
      },
      {
        "table": {
          "table_name": "f",
          "access_type": "ref",
          "possible_keys": [
            "idx_group_id"
          ],
          "key": "idx_group_id",
          "used_key_parts": [
            "group_id"
          ],
          "key_length": "3",
          "ref": [
            "test2_gaseus.p.group_id"
          ],
          "rows_examined_per_scan": 7,
          "rows_produced_per_join": 672,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "168.00",
            "eval_cost": "67.20",
            "prefix_cost": "336.01",
            "data_read_per_join": "68K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}