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 (
    356117, 359227, 359292, 350167, 350940, 
    352035, 352746, 354264, 350874, 351272, 
    353847, 354164, 356786, 359059, 350490, 
    354138, 355700, 356771, 358492, 350153, 
    350877, 354373, 350107, 353043, 355763, 
    356235, 356729, 356882, 354807, 355854, 
    349681, 350191, 351952, 352553, 357881, 
    359100, 350711, 351238, 351466, 351490, 
    351956, 353017, 353063, 355767, 350028, 
    351230, 353612, 356950, 357344, 358081, 
    353584, 355704, 358368, 353613, 351326, 
    351854, 353449, 355920, 358883, 351893, 
    351902, 351906, 354434, 356635, 356894, 
    358817, 353894, 355224, 358402, 354579, 
    355858, 357962, 350556, 353124, 352870, 
    353751, 357281, 357870, 352738, 356044, 
    358751, 357842, 359236, 350769, 352961, 
    354903, 357746, 350988, 351112, 352338, 
    352879, 353501, 353630, 354298, 357826, 
    353453, 354602, 358074, 350409, 352863
  )

Query time 0.00122

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "430.18"
    },
    "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": 100,
          "rows_produced_per_join": 100,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "120.12",
            "eval_cost": "20.00",
            "prefix_cost": "140.12",
            "data_read_per_join": "1K"
          },
          "used_columns": [
            "product_id",
            "parent_product_id",
            "group_id"
          ],
          "attached_condition": "(`webmarco`.`p`.`product_id` in (356117,359227,359292,350167,350940,352035,352746,354264,350874,351272,353847,354164,356786,359059,350490,354138,355700,356771,358492,350153,350877,354373,350107,353043,355763,356235,356729,356882,354807,355854,349681,350191,351952,352553,357881,359100,350711,351238,351466,351490,351956,353017,353063,355767,350028,351230,353612,356950,357344,358081,353584,355704,358368,353613,351326,351854,353449,355920,358883,351893,351902,351906,354434,356635,356894,358817,353894,355224,358402,354579,355858,357962,350556,353124,352870,353751,357281,357870,352738,356044,358751,357842,359236,350769,352961,354903,357746,350988,351112,352338,352879,353501,353630,354298,357826,353453,354602,358074,350409,352863))"
        }
      },
      {
        "table": {
          "table_name": "g",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "3",
          "ref": [
            "webmarco.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 100,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "100.00",
            "eval_cost": "20.00",
            "prefix_cost": "260.12",
            "data_read_per_join": "39K"
          },
          "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": [
            "webmarco.p.group_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 141,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "141.72",
            "eval_cost": "28.34",
            "prefix_cost": "430.18",
            "data_read_per_join": "14K"
          },
          "used_columns": [
            "feature_id",
            "purpose",
            "group_id"
          ]
        }
      }
    ]
  }
}