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 = 'ru' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'A' 
  AND cscart_images_links.object_id IN (
    363, 2393, 2391, 2340, 2403, 2397, 2394, 
    2402, 2401, 2399, 2345, 2398
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00098

JSON explain

{
  "query_block": {
    "select_id": 1,
    "read_sorted_file": {
      "filesort": {
        "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
        "table": {
          "table_name": "cscart_images_links",
          "access_type": "range",
          "possible_keys": ["object_id"],
          "key": "object_id",
          "key_length": "81",
          "used_key_parts": ["object_id", "object_type", "type"],
          "rows": 35,
          "filtered": 100,
          "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'A' and cscart_images_links.object_id in (363,2393,2391,2340,2403,2397,2394,2402,2401,2399,2345,2398)"
        }
      }
    },
    "table": {
      "table_name": "cscart_images",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "4",
      "used_key_parts": ["image_id"],
      "ref": ["noframes_kz_new.cscart_images_links.detailed_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_images_links.detailed_id = cscart_images.image_id)"
    },
    "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": ["noframes_kz_new.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 = 'ru' and trigcond(cscart_images.image_id is not null))"
    }
  }
}

Result

image_id image_path image_x image_y is_high_res rf_original pair_id object_id object_type detailed_id type position alt images_image_id
0 oscar-fotor-2024082113550_crop.jpg 1340 890 N oscar-fotor-2024082113550_crop.jpg 10825 363 product 9032 A 2 9032
0 IMG_20240819_152606_crop_lu8k-w8.jpg 1340 890 N IMG_20240819_152606_crop_lu8k-w8.jpg 10940 2393 product 9147 A 2 9147
0 OSCAR-3_crop.jpg 1340 890 N OSCAR-3_crop.jpg 10826 363 product 9033 A 3 9033
0 IMG_20240819_153249_crop_j3wm-15.jpg 1340 890 N IMG_20240819_153249_crop_j3wm-15.jpg 10941 2393 product 9148 A 3 9148
0 Antique_Gold6_crop_hpv4-ff.jpg 1340 890 N Antique_Gold6_crop_hpv4-ff.jpg 11046 2340 product 9253 A 3 9253
0 DSC_7280-fotor-20240819135740_crop.jpg 1340 890 N DSC_7280-fotor-20240819135740_crop.jpg 10909 2391 product 9116 A 4 9116
0 DSC_6310--fotor-20240819183730_crop.jpg 1340 890 N DSC_6310--fotor-20240819183730_crop.jpg 10946 2394 product 9153 A 4 9153
0 IMG_20240819_145448_crop.jpg 1340 890 N IMG_20240819_145448_crop.jpg 10963 2397 product 9170 A 4 9170
0 Pebbles_худ_фото-fotor-20240821121336_crop.jpg 1340 890 N Pebbles_худ_фото-fotor-20240821121336_crop.jpg 10968 2399 product 9175 A 4 9175
0 PRISMATIC1_crop.jpg 1340 890 N PRISMATIC1_crop.jpg 10982 2401 product 9189 A 4 9189
0 SHALE--1.jpg 1340 890 N SHALE--1.jpg 10986 2402 product 9193 A 4 9193
0 Antique_Gold7_crop_wz50-8r.jpg 1340 890 N Antique_Gold7_crop_wz50-8r.jpg 11047 2340 product 9254 A 4 9254
0 IMG_20240819_142440_crop.jpg 1340 890 N IMG_20240819_142440_crop.jpg 10910 2391 product 9117 A 5 9117
0 DSC_6332-fotor-20240819182633_crop.jpg 1340 890 N DSC_6332-fotor-20240819182633_crop.jpg 10947 2394 product 9154 A 5 9154
0 IMG_20240819_150647_crop.jpg 1340 890 N IMG_20240819_150647_crop.jpg 10964 2397 product 9171 A 5 9171
0 Pebbles_складка_-fotor-2024082112655_crop.jpg 1340 890 N Pebbles_складка_-fotor-2024082112655_crop.jpg 10969 2399 product 9176 A 5 9176
0 PRISMATIC2_crop.jpg 1340 890 N PRISMATIC2_crop.jpg 10983 2401 product 9190 A 5 9190
0 SHALE--2.jpg 1340 890 N SHALE--2.jpg 10987 2402 product 9194 A 5 9194
0 IMG_20240819_143857_crop.jpg 1340 890 N IMG_20240819_143857_crop.jpg 10911 2391 product 9118 A 6 9118
0 DSC_6379-fotor-2024081918416_crop.jpg 1340 890 N DSC_6379-fotor-2024081918416_crop.jpg 10948 2394 product 9155 A 6 9155
0 IMG_20240819_151345_crop.jpg 1340 890 N IMG_20240819_151345_crop.jpg 10965 2397 product 9172 A 6 9172
0 IMG_20240818_231643_crop.jpg 1340 890 N IMG_20240818_231643_crop.jpg 10970 2399 product 9177 A 6 9177
0 PRISMATIC3_crop.jpg 1340 890 N PRISMATIC3_crop.jpg 10984 2401 product 9191 A 6 9191
0 SHALE--3.jpg 1340 890 N SHALE--3.jpg 10988 2402 product 9195 A 6 9195
0 NORDIC_OCEAN1.jpg 1340 881 N NORDIC_OCEAN1.jpg 11017 2398 product 9224 A 6 9224
0 SUMATRA_SOFT_MIX3_crop.jpg 1340 890 N SUMATRA_SOFT_MIX3_crop.jpg 11025 2403 product 9232 A 6 9232
0 IMG_20240819_143933_crop.jpg 1340 890 N IMG_20240819_143933_crop.jpg 10912 2391 product 9119 A 7 9119
0 DSC_8624-fotor-2024081915382_crop_o4qu-5g.jpg 1340 890 N DSC_8624-fotor-2024081915382_crop_o4qu-5g.jpg 10942 2393 product 9149 A 7 9149
0 Lama_складка-fotor-20240821115254_crop.jpg 1340 890 N Lama_складка-fotor-20240821115254_crop.jpg 10949 2394 product 9156 A 7 9156
0 Mosaic_складка-fotor-2024082112352_crop.jpg 1340 890 N Mosaic_складка-fotor-2024082112352_crop.jpg 10966 2397 product 9173 A 7 9173
0 SHALE--4.jpg 1340 890 N SHALE--4.jpg 10989 2402 product 9196 A 7 9196
0 NORDIC_OCEAN2_crop.jpg 1340 890 N NORDIC_OCEAN2_crop.jpg 11018 2398 product 9225 A 7 9225
0 SUMATRA_SOFT_MIX4.jpg 1340 893 N SUMATRA_SOFT_MIX4.jpg 11026 2403 product 9233 A 7 9233
0 Ecotouch_складка-fotor-20240821112817_crop.jpg 1340 890 N Ecotouch_складка-fotor-20240821112817_crop.jpg 10913 2391 product 9120 A 8 9120
0 Grigio_2-fotor-2024082111433_crop_nwpj-qu.jpg 1340 890 N Grigio_2-fotor-2024082111433_crop_nwpj-qu.jpg 10943 2393 product 9150 A 8 9150
0 NORDIC_OCEAN3.jpg 1340 893 N NORDIC_OCEAN3.jpg 11019 2398 product 9226 A 8 9226
0 OSCAR-2_crop.jpg 1340 890 N OSCAR-2_crop.jpg 10827 363 product 9034 A 9 9034
0 Grigio_3-fotor-20240821115034_crop_i8uz-y5.jpg 1340 890 N Grigio_3-fotor-20240821115034_crop_i8uz-y5.jpg 10944 2393 product 9151 A 9 9151
0 Antique_Gold2_wegx-rs.jpg 1340 895 N Antique_Gold2_wegx-rs.jpg 11048 2340 product 9255 A 9 9255
0 OSCAR_2_crop.jpg 1340 890 N OSCAR_2_crop.jpg 10828 363 product 9035 A 10 9035
0 Antique_Gold4_6ji1-0y.jpg 1340 893 N Antique_Gold4_6ji1-0y.jpg 11049 2340 product 9256 A 10 9256
0 OSCAR_3_crop.jpg 1340 890 N OSCAR_3_crop.jpg 10829 363 product 9036 A 11 9036
0 Antique_Gold1_gmli-xn.jpg 1340 638 N Antique_Gold1_gmli-xn.jpg 11050 2340 product 9257 A 11 9257
0 Antique_Gold3_hhqk-7s.jpg 1340 894 N Antique_Gold3_hhqk-7s.jpg 11051 2340 product 9258 A 12 9258
0 Pearl1_crop_lyfn-zl.jpg 1340 890 N Pearl1_crop_lyfn-zl.jpg 11065 2345 product 9272 A 21 9272
0 Pearl2_crop_7p1f-ii.jpg 1340 890 N Pearl2_crop_7p1f-ii.jpg 11066 2345 product 9273 A 22 9273
0 Pearl3_crop_9m7c-yr.jpg 1340 890 N Pearl3_crop_9m7c-yr.jpg 11067 2345 product 9274 A 23 9274
0 Pearl4_crop_n54i-97.jpg 1340 890 N Pearl4_crop_n54i-97.jpg 11068 2345 product 9275 A 24 9275
0 Pearl5_crop_n1oe-lj.jpg 1340 890 N Pearl5_crop_n1oe-lj.jpg 11069 2345 product 9276 A 25 9276
0 Pearl6_crop_59jq-qx.jpg 1340 890 N Pearl6_crop_59jq-qx.jpg 11070 2345 product 9277 A 26 9277