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 (
    1518, 2411, 2336, 2328, 2303, 1769, 2391, 
    2597, 2339, 2340, 2403, 2409
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00107

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": 42,
          "filtered": 100,
          "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'A' and cscart_images_links.object_id in (1518,2411,2336,2328,2303,1769,2391,2597,2339,2340,2403,2409)"
        }
      }
    },
    "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 BAMBOO_CARPET_GOOD_NIGHT_BLUE_M_1.jpg 900 675 N BAMBOO_CARPET_GOOD_NIGHT_BLUE_M_1.jpg 8100 2328 product 6310 A 1 6310
0 горизонт__1__crop_e0wg-6l.jpg 1340 890 N горизонт__1__crop_e0wg-6l.jpg 10786 2597 product 8993 A 1 8993
0 oscar-fotor-2024082113550_crop_lg4m-hs.jpg 1340 890 N oscar-fotor-2024082113550_crop_lg4m-hs.jpg 10837 1518 product 9044 A 1 9044
0 Satin_Silver8_v33l-yd.jpg 1340 894 N Satin_Silver8_v33l-yd.jpg 11094 2339 product 9301 A 1 9301
0 BAMBOO_CARPET_GOOD_NIGHT_BLUE_M_2.jpg 900 675 N BAMBOO_CARPET_GOOD_NIGHT_BLUE_M_2.jpg 8101 2328 product 6311 A 2 6311
0 01_c2u7-1h.PNG 963 495 N 01_c2u7-1h.PNG 8176 2336 product 6386 A 2 6386
0 OSCAR-3_crop_f8ze-4n.jpg 1340 890 N OSCAR-3_crop_f8ze-4n.jpg 10838 1518 product 9045 A 2 9045
0 Satin_Silver7_crop_xg2w-45.jpg 1340 890 N Satin_Silver7_crop_xg2w-45.jpg 11095 2339 product 9302 A 2 9302
0 02_20tf-xd.PNG 888 591 N 02_20tf-xd.PNG 8177 2336 product 6387 A 3 6387
0 Antique_Gold6_crop_hpv4-ff.jpg 1340 890 N Antique_Gold6_crop_hpv4-ff.jpg 11046 2340 product 9253 A 3 9253
0 Satin_Silver4_crop_j6cl-d9.jpg 1340 890 N Satin_Silver4_crop_j6cl-d9.jpg 11096 2339 product 9303 A 3 9303
0 03_5i6o-5n.PNG 1025 688 N 03_5i6o-5n.PNG 8178 2336 product 6388 A 4 6388
0 DSC_7526-fotor-20240818214650_crop_i230-ju.jpg 1340 890 N DSC_7526-fotor-20240818214650_crop_i230-ju.jpg 10905 2411 product 9112 A 4 9112
0 DSC_7280-fotor-20240819135740_crop.jpg 1340 890 N DSC_7280-fotor-20240819135740_crop.jpg 10909 2391 product 9116 A 4 9116
0 ZEBRA--1_crop_hi7y-a5.jpg 1340 890 N ZEBRA--1_crop_hi7y-a5.jpg 11003 2409 product 9210 A 4 9210
0 Antique_Gold7_crop_wz50-8r.jpg 1340 890 N Antique_Gold7_crop_wz50-8r.jpg 11047 2340 product 9254 A 4 9254
0 Satin_Silver5_p5c8-3z.jpg 1340 893 N Satin_Silver5_p5c8-3z.jpg 11097 2339 product 9304 A 4 9304
0 04_e1c9-u1.PNG 964 638 N 04_e1c9-u1.PNG 8179 2336 product 6389 A 5 6389
0 IMG_20240818_223813_crop_zv9z-al.jpg 1340 890 N IMG_20240818_223813_crop_zv9z-al.jpg 10808 1769 product 9015 A 5 9015
0 DSC_2184-fotor-20240802151452_crop_2ebl-og.jpg 1340 890 N DSC_2184-fotor-20240802151452_crop_2ebl-og.jpg 10855 2303 product 9062 A 5 9062
0 DSC_7642-fotor-2024081822143_crop.jpg 1340 890 N DSC_7642-fotor-2024081822143_crop.jpg 10906 2411 product 9113 A 5 9113
0 IMG_20240819_142440_crop.jpg 1340 890 N IMG_20240819_142440_crop.jpg 10910 2391 product 9117 A 5 9117
0 ZEBRA--2_crop_mpf8-s3.jpg 1340 890 N ZEBRA--2_crop_mpf8-s3.jpg 11004 2409 product 9211 A 5 9211
0 05_8wuh-wc.PNG 1024 686 N 05_8wuh-wc.PNG 8180 2336 product 6390 A 6 6390
0 IMG_20240818_224254_crop_cshl-ik.jpg 1340 890 N IMG_20240818_224254_crop_cshl-ik.jpg 10809 1769 product 9016 A 6 9016
0 DSC_2197-fotor-20240802152923_crop_y8zd-7f.jpg 1340 890 N DSC_2197-fotor-20240802152923_crop_y8zd-7f.jpg 10856 2303 product 9063 A 6 9063
0 Botanicа_складка-fotor-20240821111955_crop_zdvl-au.jpg 1340 890 N Botanicа_складка-fotor-20240821111955_crop_zdvl-au.jpg 10907 2411 product 9114 A 6 9114
0 IMG_20240819_143857_crop.jpg 1340 890 N IMG_20240819_143857_crop.jpg 10911 2391 product 9118 A 6 9118
0 ZEBRA--3_crop_lfsc-62.jpg 1340 890 N ZEBRA--3_crop_lfsc-62.jpg 11005 2409 product 9212 A 6 9212
0 SUMATRA_SOFT_MIX3_crop.jpg 1340 890 N SUMATRA_SOFT_MIX3_crop.jpg 11025 2403 product 9232 A 6 9232
0 flerense_2_crop_fvro-ua.jpg 1340 890 N flerense_2_crop_fvro-ua.jpg 10787 2597 product 8994 A 7 8994
0 IMG_20240818_224525_crop_whqv-mm.jpg 1340 890 N IMG_20240818_224525_crop_whqv-mm.jpg 10810 1769 product 9017 A 7 9017
0 OSCAR-2_crop_fnuy-2u.jpg 1340 890 N OSCAR-2_crop_fnuy-2u.jpg 10839 1518 product 9046 A 7 9046
0 DSC_2252-fotor-2024080215186_crop_5c47-4x.jpg 1340 890 N DSC_2252-fotor-2024080215186_crop_5c47-4x.jpg 10857 2303 product 9064 A 7 9064
0 IMG_20240819_143933_crop.jpg 1340 890 N IMG_20240819_143933_crop.jpg 10912 2391 product 9119 A 7 9119
0 ZEBRA--5_crop_4ro2-ev.jpg 1340 890 N ZEBRA--5_crop_4ro2-ev.jpg 11006 2409 product 9213 A 7 9213
0 SUMATRA_SOFT_MIX4.jpg 1340 893 N SUMATRA_SOFT_MIX4.jpg 11026 2403 product 9233 A 7 9233
0 florense_3-fotor-20240821142222_crop_9oj4-9f.jpg 1340 890 N florense_3-fotor-20240821142222_crop_9oj4-9f.jpg 10788 2597 product 8995 A 8 8995
0 IMG_20240818_224107_crop_8ovq-fp.jpg 1340 890 N IMG_20240818_224107_crop_8ovq-fp.jpg 10811 1769 product 9018 A 8 9018
0 OSCAR_2_crop_dd7u-x6.jpg 1340 890 N OSCAR_2_crop_dd7u-x6.jpg 10840 1518 product 9047 A 8 9047
0 DSC_4070_crop_dhek-sl.jpg 1340 890 N DSC_4070_crop_dhek-sl.jpg 10858 2303 product 9065 A 8 9065
0 Ecotouch_складка-fotor-20240821112817_crop.jpg 1340 890 N Ecotouch_складка-fotor-20240821112817_crop.jpg 10913 2391 product 9120 A 8 9120
0 ZEBRA--6_crop_sgac-we.jpg 1340 890 N ZEBRA--6_crop_sgac-we.jpg 11007 2409 product 9214 A 8 9214
0 OSCAR_3_crop_kf6q-nu.jpg 1340 890 N OSCAR_3_crop_kf6q-nu.jpg 10841 1518 product 9048 A 9 9048
0 DSC_4085_crop_4sin-38.jpg 1340 890 N DSC_4085_crop_4sin-38.jpg 10859 2303 product 9066 A 9 9066
0 ZEBRA--4_crop_oo0l-f1.jpg 1340 890 N ZEBRA--4_crop_oo0l-f1.jpg 11008 2409 product 9215 A 9 9215
0 Antique_Gold2_wegx-rs.jpg 1340 895 N Antique_Gold2_wegx-rs.jpg 11048 2340 product 9255 A 9 9255
0 DSC_4103_crop_0din-2q.jpg 1340 890 N DSC_4103_crop_0din-2q.jpg 10860 2303 product 9067 A 10 9067
0 Antique_Gold4_6ji1-0y.jpg 1340 893 N Antique_Gold4_6ji1-0y.jpg 11049 2340 product 9256 A 10 9256
0 DSC_4116_crop_jw5d-74.jpg 1340 890 N DSC_4116_crop_jw5d-74.jpg 10861 2303 product 9068 A 11 9068
0 Antique_Gold1_gmli-xn.jpg 1340 638 N Antique_Gold1_gmli-xn.jpg 11050 2340 product 9257 A 11 9257
0 Satin_Silver1_mr1y-5a.jpg 1340 867 N Satin_Silver1_mr1y-5a.jpg 11098 2339 product 9305 A 11 9305
0 Antique_Gold3_hhqk-7s.jpg 1340 894 N Antique_Gold3_hhqk-7s.jpg 11051 2340 product 9258 A 12 9258
0 Satin_Silver3_lis0-sd.jpg 1340 859 N Satin_Silver3_lis0-sd.jpg 11099 2339 product 9306 A 12 9306
0 Satin_Silver2_a07s-mi.jpg 1340 673 N Satin_Silver2_a07s-mi.jpg 11100 2339 product 9307 A 13 9307