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 (
    366, 1517, 356, 362, 1603, 2304, 369, 
    363, 1519, 1768, 1518, 2303
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00150

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 (366,1517,356,362,1603,2304,369,363,1519,1768,1518,2303)"
        }
      }
    },
    "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 DSC_2063-fotor-2024080216650_crop_fofe-p0.jpg 1340 890 N DSC_2063-fotor-2024080216650_crop_fofe-p0.jpg 10684 1768 product 8891 A 1 8891
0 ORIGAMI-3_crop.jpg 1340 890 N ORIGAMI-3_crop.jpg 10812 362 product 9019 A 1 9019
0 origami-fotor-20240821135636_crop_2x2r-v0.jpg 1340 890 N origami-fotor-20240821135636_crop_2x2r-v0.jpg 10821 1603 product 9028 A 1 9028
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 DSC_2109=-fotor-2024080216345_crop_wltl-dx.jpg 1340 890 N DSC_2109=-fotor-2024080216345_crop_wltl-dx.jpg 10685 1768 product 8892 A 2 8892
0 origami-fotor-20240821135636_crop.jpg 1340 890 N origami-fotor-20240821135636_crop.jpg 10813 362 product 9020 A 2 9020
0 ORIGAMI-3_crop_ghae-dl.jpg 1340 890 N ORIGAMI-3_crop_ghae-dl.jpg 10822 1603 product 9029 A 2 9029
0 oscar-fotor-2024082113550_crop.jpg 1340 890 N oscar-fotor-2024082113550_crop.jpg 10825 363 product 9032 A 2 9032
0 OSCAR-3_crop_f8ze-4n.jpg 1340 890 N OSCAR-3_crop_f8ze-4n.jpg 10838 1518 product 9045 A 2 9045
0 spectrum-fotor-2024082115334_crop.jpg 1340 890 N spectrum-fotor-2024082115334_crop.jpg 10885 369 product 9092 A 2 9092
0 ORIGAMI-2_crop.jpg 1340 890 N ORIGAMI-2_crop.jpg 10815 362 product 9022 A 3 9022
0 OSCAR-3_crop.jpg 1340 890 N OSCAR-3_crop.jpg 10826 363 product 9033 A 3 9033
0 PRISMA_LOFT_DESIGN-fotor-20240821134141_crop.jpg 1340 890 N PRISMA_LOFT_DESIGN-fotor-20240821134141_crop.jpg 10863 2304 product 9070 A 3 9070
0 DSC_3451-fotor-2024081816859_crop_2oqs-n6.jpg 1340 890 N DSC_3451-fotor-2024081816859_crop_2oqs-n6.jpg 10740 1519 product 8947 A 5 8947
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_3451-fotor-2024081816859_crop.jpg 1340 890 N DSC_3451-fotor-2024081816859_crop.jpg 10732 366 product 8939 A 6 8939
0 DSC_3442-fotor-2024081816533_crop_mpce-qu.jpg 1340 890 N DSC_3442-fotor-2024081816533_crop_mpce-qu.jpg 10741 1519 product 8948 A 6 8948
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 apatite-2_nj3i-26.jpg 1340 893 N apatite-2_nj3i-26.jpg 10702 1517 product 8909 A 7 8909
0 DSC_3442-fotor-2024081816533_crop.jpg 1340 890 N DSC_3442-fotor-2024081816533_crop.jpg 10733 366 product 8940 A 7 8940
0 DSC_3428-fotor-20240818155839_crop_cet2-z0.jpg 1340 890 N DSC_3428-fotor-20240818155839_crop_cet2-z0.jpg 10742 1519 product 8949 A 7 8949
0 ORIGAMI-2_crop_a9sp-pr.jpg 1340 890 N ORIGAMI-2_crop_a9sp-pr.jpg 10823 1603 product 9030 A 7 9030
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 SPECTRUM3_crop.jpg 1340 890 N SPECTRUM3_crop.jpg 10886 369 product 9093 A 7 9093
0 DSC_2157=-fotor-2024080216733_crop_z7np-cf.jpg 1340 890 N DSC_2157=-fotor-2024080216733_crop_z7np-cf.jpg 10686 1768 product 8893 A 8 8893
0 IMG_20240818_201714-fotor-20240821152116_crop_hbra-mm.jpg 1340 890 N IMG_20240818_201714-fotor-20240821152116_crop_hbra-mm.jpg 10703 1517 product 8910 A 8 8910
0 DSC_3428-fotor-20240818155839_crop.jpg 1340 890 N DSC_3428-fotor-20240818155839_crop.jpg 10734 366 product 8941 A 8 8941
0 IMG_20240818_223813_crop.jpg 1340 890 N IMG_20240818_223813_crop.jpg 10803 356 product 9010 A 8 9010
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 SPECTRUM2_crop.jpg 1340 890 N SPECTRUM2_crop.jpg 10887 369 product 9094 A 8 9094
0 antique_2_j398-t5.jpg 1340 893 N antique_2_j398-t5.jpg 10687 1768 product 8894 A 9 8894
0 IMG_20240818_201823-fotor-20240821145944_crop_dmsf-6e.jpg 1340 890 N IMG_20240818_201823-fotor-20240821145944_crop_dmsf-6e.jpg 10704 1517 product 8911 A 9 8911
0 IMG_20240818_224254_crop.jpg 1340 890 N IMG_20240818_224254_crop.jpg 10804 356 product 9011 A 9 9011
0 OSCAR-2_crop.jpg 1340 890 N OSCAR-2_crop.jpg 10827 363 product 9034 A 9 9034
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 DSC_3965-fotor-20240821134643_crop.jpg 1340 890 N DSC_3965-fotor-20240821134643_crop.jpg 10864 2304 product 9071 A 9 9071
0 anique_3_fmm5-0p.jpg 1340 893 N anique_3_fmm5-0p.jpg 10688 1768 product 8895 A 10 8895
0 IMG_20240818_202957-fotor-20240821145826_crop_h7wt-it.jpg 1340 890 N IMG_20240818_202957-fotor-20240821145826_crop_h7wt-it.jpg 10705 1517 product 8912 A 10 8912
0 IMG_20240818_224525_crop.jpg 1340 890 N IMG_20240818_224525_crop.jpg 10805 356 product 9012 A 10 9012
0 OSCAR_2_crop.jpg 1340 890 N OSCAR_2_crop.jpg 10828 363 product 9035 A 10 9035
0 DSC_4103_crop_0din-2q.jpg 1340 890 N DSC_4103_crop_0din-2q.jpg 10860 2303 product 9067 A 10 9067
0 DSC_4027-fotor-20240821134538_crop.jpg 1340 890 N DSC_4027-fotor-20240821134538_crop.jpg 10865 2304 product 9072 A 10 9072
0 IMG_20240818_202728-fotor-20240821145845_crop_basb-1m.jpg 1340 890 N IMG_20240818_202728-fotor-20240821145845_crop_basb-1m.jpg 10706 1517 product 8913 A 11 8913
0 IMG_20240818_224107_crop.jpg 1340 890 N IMG_20240818_224107_crop.jpg 10806 356 product 9013 A 11 9013
0 OSCAR_3_crop.jpg 1340 890 N OSCAR_3_crop.jpg 10829 363 product 9036 A 11 9036
0 DSC_4116_crop_jw5d-74.jpg 1340 890 N DSC_4116_crop_jw5d-74.jpg 10861 2303 product 9068 A 11 9068
0 DSC_3986-fotor-2024082113468_crop.jpg 1340 890 N DSC_3986-fotor-2024082113468_crop.jpg 10866 2304 product 9073 A 11 9073
0 DSC_3898-fotor-2024082113451_crop.jpg 1340 890 N DSC_3898-fotor-2024082113451_crop.jpg 10867 2304 product 9074 A 12 9074