SELECT 
  cscart_images.*, 
  cscart_images_links.*, 
  cscart_common_descriptions.description AS alt, 
  cscart_images.image_id AS images_image_id 
FROM 
  cscart_images_links 
  LEFT JOIN cscart_images ON cscart_images_links.detailed_id = cscart_images.image_id 
  LEFT JOIN cscart_common_descriptions ON cscart_common_descriptions.object_id = cscart_images.image_id 
  AND cscart_common_descriptions.object_holder = 'images' 
  AND cscart_common_descriptions.lang_code = 'vi' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    33725, 48023, 48020, 48017, 48016, 48015, 
    854, 24513, 24514, 24515, 33724, 34226, 
    34243, 34202, 34203, 34204, 34205, 
    34206, 34207, 34208, 34209, 34210, 
    34211, 34212, 34213, 34214, 34215, 
    34216, 34217, 856, 24507, 34053, 34054, 
    34056, 34059, 34062, 34065, 34068, 
    34071, 34074, 34076, 34079, 34082, 
    34085, 34088, 34091, 34094, 34097, 
    34100, 18400, 18399, 18398, 18397, 
    18396, 18395, 18394, 4271, 18393, 18392, 
    18391, 18390, 18389, 18388, 18387, 
    4272, 18421, 18420, 18419, 18418, 18417, 
    18416, 18415, 4268, 18428, 18427, 18426, 
    18425, 18424, 18423, 18422, 4267, 41596, 
    41616, 41203, 41224, 41225, 41226, 
    33721, 34036, 34037, 34038, 34039, 
    34040, 34041, 34042, 34043, 34044, 
    34045, 34046, 34047, 34048, 34049, 
    34050, 34051, 40312, 40348
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00307

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "read_sorted_file": {
          "filesort": {
            "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
            "table": {
              "table_name": "cscart_images_links",
              "access_type": "ALL",
              "possible_keys": ["object_id"],
              "rows": 125,
              "filtered": 84.80000305,
              "attached_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (33725,48023,48020,48017,48016,48015,854,24513,24514,24515,33724,34226,34243,34202,34203,34204,34205,34206,34207,34208,34209,34210,34211,34212,34213,34214,34215,34216,34217,856,24507,34053,34054,34056,34059,34062,34065,34068,34071,34074,34076,34079,34082,34085,34088,34091,34094,34097,34100,18400,18399,18398,18397,18396,18395,18394,4271,18393,18392,18391,18390,18389,18388,18387,4272,18421,18420,18419,18418,18417,18416,18415,4268,18428,18427,18426,18425,18424,18423,18422,4267,41596,41616,41203,41224,41225,41226,33721,34036,34037,34038,34039,34040,34041,34042,34043,34044,34045,34046,34047,34048,34049,34050,34051,40312,40348)"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "cscart_images",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["image_id"],
          "ref": ["dev_db.cscart_images_links.detailed_id"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "cscart_common_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "107",
          "used_key_parts": ["object_id", "lang_code", "object_holder"],
          "ref": ["dev_db.cscart_images.image_id", "const", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_common_descriptions.object_id = cscart_images.image_id and cscart_common_descriptions.object_holder = 'images' and cscart_common_descriptions.lang_code = 'vi' and trigcond(cscart_images.image_id is not null))"
        }
      }
    ]
  }
}