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 = 'M' 
  AND cscart_images_links.object_id IN (
    51357, 79, 51360, 51359, 51358, 115, 
    51151, 51150, 51149, 37, 11, 140, 51385, 
    51386, 51387, 51388, 51389, 51132, 
    51131, 51134, 51133, 51130, 41, 51361, 
    30, 51362, 51363, 51364, 51365, 51169, 
    51168, 51167, 51166, 90, 51171, 51170, 
    51146, 51145, 38, 51148, 51147, 51209, 
    51208, 51207, 51206, 124, 81, 56, 51326, 
    135, 82, 116, 51295, 117, 51205, 51204, 
    51203, 51202, 125, 106, 51144, 51143, 
    51142, 51141, 51140, 39, 65, 51139, 
    51138, 51137, 51136, 51135, 40, 22710, 
    51077, 51080, 51078, 51079, 51076, 
    51073, 51072, 51074, 51075, 22711, 
    17, 57, 51349, 122, 58, 5, 22, 18, 27
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00428

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "259.76"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "110.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_images_links",
            "access_type": "range",
            "possible_keys": [
              "object_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type",
              "type"
            ],
            "key_length": "81",
            "rows_examined_per_scan": 110,
            "rows_produced_per_join": 110,
            "filtered": "100.00",
            "index_condition": "((`test_uchur_k`.`cscart_images_links`.`object_type` = 'product') and (`test_uchur_k`.`cscart_images_links`.`type` = 'M') and (`test_uchur_k`.`cscart_images_links`.`object_id` in (51357,79,51360,51359,51358,115,51151,51150,51149,37,11,140,51385,51386,51387,51388,51389,51132,51131,51134,51133,51130,41,51361,30,51362,51363,51364,51365,51169,51168,51167,51166,90,51171,51170,51146,51145,38,51148,51147,51209,51208,51207,51206,124,81,56,51326,135,82,116,51295,117,51205,51204,51203,51202,125,106,51144,51143,51142,51141,51140,39,65,51139,51138,51137,51136,51135,40,22710,51077,51080,51078,51079,51076,51073,51072,51074,51075,22711,17,57,51349,122,58,5,22,18,27)))",
            "cost_info": {
              "read_cost": "61.76",
              "eval_cost": "11.00",
              "prefix_cost": "72.76",
              "data_read_per_join": "10K"
            },
            "used_columns": [
              "pair_id",
              "object_id",
              "object_type",
              "image_id",
              "detailed_id",
              "type",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "image_id"
            ],
            "key_length": "4",
            "ref": [
              "test_uchur_k.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 110,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "27.50",
              "eval_cost": "11.00",
              "prefix_cost": "111.26",
              "data_read_per_join": "85K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res",
              "transparent"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_common_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "lang_code",
              "object_holder"
            ],
            "key_length": "108",
            "ref": [
              "test_uchur_k.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 110,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "27.50",
              "eval_cost": "11.00",
              "prefix_cost": "149.76",
              "data_read_per_join": "65K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ]
          }
        }
      ]
    }
  }
}

Result

image_id image_path image_x image_y is_high_res transparent pair_id object_id object_type detailed_id type position alt images_image_id
0 zhilet_steganyy_bulchut_tk_nylon_taslan_dobby_cv_chernyy_126_zhiletsteganyybulchuttknylontaslandobbycvchernyy.png 1000 1400 N N 126 65 product 8724 M 0 8724
0 kepka_uchur_logo_cap_cv_black_262_kepkauchurlogocapcvblack.png 800 1000 N N 262 27 product 8860 M 0 8860
0 kepka_uchur_logo_mesh_cap_cv_black_263_kepkauchurlogomeshcapcvblack.png 800 1000 N N 263 22 product 8861 M 0 8861
0 kepka_uchur_low_cap_cv_saas_282_kepkauchurlowcapcvsaas.jpg 1000 1400 N N 282 17 product 8880 M 0 8880
0 kepka_uchur_low_cap_cv_taas_288_kepkauchurlowcapcvtaas.png 1000 1400 N N 288 18 product 8886 M 0 8886
0 kepka_uchur_round_patch_logo_grey_cv_chernyy_bez_setki_62_1885_kepkauchurroundpatchlogogreycvchernyybezsetki.png 1000 1400 N N 318 122 product 8916 M 0 8916
0 kepka_uchur_round_patch_cv_chernyy_bez_setki_330_kepkauchurroundpatchcvchernyybezsetki.png 800 1000 N N 330 5 product 8928 M 0 8928
0 kepka_uchur_street_cv_saas_362_kepkauchurstreetcvsaas.png 800 1000 N N 362 57 product 8960 M 0 8960
0 kepka_uchur_street_cv_taas_364_kepkauchurstreetcvtaas.png 1000 1400 N N 364 58 product 8962 M 0 8962
0 kepka_uchur_visor_cv_taas_372_kepkauchurvisorcvtaas.png 1000 1400 N N 372 106 product 8970 M 0 8970
0 kurtka_uchur_softshell_iacket_cv_black_ru_1523_kurtkauchursoftshelliacketcvblack.png 1000 1400 N N 501 37 product 9099 M 0 9099
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 518 40 product 9116 M 0 9116
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 522 41 product 9120 M 0 9120
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 840 30 product 9438 M 0 9438
0 termobele_zhenskoe_uchur_haarchaana_cv_chernyy_1565_termobelezhenskoeuchurhaarchaanacvchernyy.png 1000 1400 N N 851 79 product 9449 M 0 9449
0 futbolka_zhenskaya_uchur_tuymaada_cotton_black_t_shirt_m_1894_futbolkazhenskayauchurtuymaadacottonblacktshirt.png 1000 1400 N N 984 124 product 9582 M 0 9582
0 futbolka_zhenskaya_uchur_tuymaada_cotton_gray_t_shirt_m_ru_1906_futbolkazhenskayauchurtuymaadacottongraytshirt.png 1000 1400 N N 989 125 product 9587 M 0 9587
0 shapka_uchur_beanie_cv_black_1005_shapkauchurbeaniecvblack.png 1000 1400 N N 1005 11 product 9603 M 0 9603
0 shapka_uchur_hunter_cv_saas_1012_shapkauchurhuntercvsaas.png 1000 1400 N N 1012 82 product 9610 M 0 9610
0 shapka_uchur_hunter_cv_taas_1019_shapkauchurhuntercvtaas.png 1000 1400 N N 1019 81 product 9617 M 0 9617
0 shapka_uchur_icon_wool_cv_bezhevyy_1027_shapkauchuriconwoolcvbezhevyy.png 1000 1400 N N 1027 115 product 9625 M 0 9625
0 shapka_uchur_icon_wool_cv_seryy_1032_shapkauchuriconwoolcvseryy.png 1000 1400 N N 1032 116 product 9630 M 0 9630
0 shapka_uchur_icon_wool_cv_chernyy_1037_shapkauchuriconwoolcvchernyy.png 1000 1400 N N 1037 117 product 9635 M 0 9635
0 shapka_uchur_traveler_cv_black_1048_shapkauchurtravelercvblack.png 1000 1400 N N 1048 56 product 9646 M 0 9646
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 1094 90 product 9692 M 0 9692
0 24_1iiv-sp.png 1000 1400 N N 2252 140 product 9886 M 0 9886
0 56_4ejl-go.png 1000 1400 N N 5083 22710 product 10533 M 0 10533
0 76_u48a-mz.png 1000 1400 N N 5161 22711 product 10546 M 0 10546
0 Group_12.png 1000 1400 N N 5376 39 product 10583 M 0 10583
0 Group_212.png 1000 1400 N N 5382 38 product 10584 M 0 10584
0 76_u48a-mz.png 1000 1400 N N 5582 51072 product 10546 M 0 10546
0 76_u48a-mz.png 1000 1400 N N 5595 51073 product 10546 M 0 10546
0 76_u48a-mz.png 1000 1400 N N 5608 51074 product 10546 M 0 10546
0 76_u48a-mz.png 1000 1400 N N 5621 51075 product 10546 M 0 10546
0 76_u48a-mz.png 1000 1400 N N 5634 51076 product 10546 M 0 10546
0 56_4ejl-go.png 1000 1400 N N 5647 51077 product 10533 M 0 10533
0 56_4ejl-go.png 1000 1400 N N 5660 51078 product 10533 M 0 10533
0 56_4ejl-go.png 1000 1400 N N 5673 51079 product 10533 M 0 10533
0 56_4ejl-go.png 1000 1400 N N 5686 51080 product 10533 M 0 10533
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 6364 51130 product 9120 M 0 9120
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 6370 51131 product 9120 M 0 9120
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 6376 51132 product 9120 M 0 9120
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 6382 51133 product 9120 M 0 9120
0 kurtka_uchur_softshell_iacket_cv_taas_522_kurtkauchursoftshelliacketcvtaas.png 1000 1400 N N 6388 51134 product 9120 M 0 9120
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 6392 51135 product 9116 M 0 9116
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 6396 51136 product 9116 M 0 9116
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 6400 51137 product 9116 M 0 9116
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 6404 51138 product 9116 M 0 9116
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 6408 51139 product 9116 M 0 9116
0 Group_12.png 1000 1400 N N 6424 51140 product 10583 M 0 10583
0 Group_12.png 1000 1400 N N 6440 51141 product 10583 M 0 10583
0 Group_12.png 1000 1400 N N 6456 51142 product 10583 M 0 10583
0 Group_12.png 1000 1400 N N 6472 51143 product 10583 M 0 10583
0 Group_12.png 1000 1400 N N 6488 51144 product 10583 M 0 10583
0 Group_212.png 1000 1400 N N 6502 51145 product 10584 M 0 10584
0 Group_212.png 1000 1400 N N 6516 51146 product 10584 M 0 10584
0 Group_212.png 1000 1400 N N 6530 51147 product 10584 M 0 10584
0 Group_212.png 1000 1400 N N 6544 51148 product 10584 M 0 10584
0 kurtka_uchur_softshell_iacket_cv_black_ru_1523_kurtkauchursoftshelliacketcvblack.png 1000 1400 N N 6549 51149 product 9099 M 0 9099
0 kurtka_uchur_softshell_iacket_cv_black_ru_1523_kurtkauchursoftshelliacketcvblack.png 1000 1400 N N 6554 51150 product 9099 M 0 9099
0 kurtka_uchur_softshell_iacket_cv_black_ru_1523_kurtkauchursoftshelliacketcvblack.png 1000 1400 N N 6559 51151 product 9099 M 0 9099
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6640 51166 product 9692 M 0 9692
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6649 51167 product 9692 M 0 9692
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6658 51168 product 9692 M 0 9692
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6667 51169 product 9692 M 0 9692
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6676 51170 product 9692 M 0 9692
0 shtany_uchur_all_weather_pants_pro_cv_taas_ru_2_1622_shtanyuchurallweatherpantsprocvtaas.png 1000 1400 N N 6685 51171 product 9692 M 0 9692
0 futbolka_zhenskaya_uchur_tuymaada_cotton_gray_t_shirt_m_ru_1906_futbolkazhenskayauchurtuymaadacottongraytshirt.png 1000 1400 N N 6885 51202 product 9587 M 0 9587
0 futbolka_zhenskaya_uchur_tuymaada_cotton_gray_t_shirt_m_ru_1906_futbolkazhenskayauchurtuymaadacottongraytshirt.png 1000 1400 N N 6891 51203 product 9587 M 0 9587
0 futbolka_zhenskaya_uchur_tuymaada_cotton_gray_t_shirt_m_ru_1906_futbolkazhenskayauchurtuymaadacottongraytshirt.png 1000 1400 N N 6897 51204 product 9587 M 0 9587
0 futbolka_zhenskaya_uchur_tuymaada_cotton_gray_t_shirt_m_ru_1906_futbolkazhenskayauchurtuymaadacottongraytshirt.png 1000 1400 N N 6903 51205 product 9587 M 0 9587
0 futbolka_zhenskaya_uchur_tuymaada_cotton_black_t_shirt_m_1894_futbolkazhenskayauchurtuymaadacottonblacktshirt.png 1000 1400 N N 6908 51206 product 9582 M 0 9582
0 futbolka_zhenskaya_uchur_tuymaada_cotton_black_t_shirt_m_1894_futbolkazhenskayauchurtuymaadacottonblacktshirt.png 1000 1400 N N 6913 51207 product 9582 M 0 9582
0 futbolka_zhenskaya_uchur_tuymaada_cotton_black_t_shirt_m_1894_futbolkazhenskayauchurtuymaadacottonblacktshirt.png 1000 1400 N N 6918 51208 product 9582 M 0 9582
0 futbolka_zhenskaya_uchur_tuymaada_cotton_black_t_shirt_m_1894_futbolkazhenskayauchurtuymaadacottonblacktshirt.png 1000 1400 N N 6923 51209 product 9582 M 0 9582
0 shapka_uchur_icon_wool_cv_chernyy_1037_shapkauchuriconwoolcvchernyy.png 1000 1400 N N 7770 51295 product 9635 M 0 9635
0 kepka_uchur_round_patch_logo_grey_cv_chernyy_bez_setki_62_1885_kepkauchurroundpatchlogogreycvchernyybezsetki.png 1000 1400 N N 8937 51349 product 8916 M 0 8916
0 termobele_zhenskoe_uchur_haarchaana_cv_chernyy_1565_termobelezhenskoeuchurhaarchaanacvchernyy.png 1000 1400 N N 9017 51357 product 9449 M 0 9449
0 termobele_zhenskoe_uchur_haarchaana_cv_chernyy_1565_termobelezhenskoeuchurhaarchaanacvchernyy.png 1000 1400 N N 9033 51358 product 9449 M 0 9449
0 termobele_zhenskoe_uchur_haarchaana_cv_chernyy_1565_termobelezhenskoeuchurhaarchaanacvchernyy.png 1000 1400 N N 9049 51359 product 9449 M 0 9449
0 termobele_zhenskoe_uchur_haarchaana_cv_chernyy_1565_termobelezhenskoeuchurhaarchaanacvchernyy.png 1000 1400 N N 9065 51360 product 9449 M 0 9449
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 9071 51361 product 9438 M 0 9438
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 9077 51362 product 9438 M 0 9438
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 9083 51363 product 9438 M 0 9438
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 9089 51364 product 9438 M 0 9438
0 termobele_uchur_mens_thermal_underwear_cv_saas_ru_3_1411_termobeleuchurmensthermalunderwearcvsaas.png 1000 1400 N N 9095 51365 product 9438 M 0 9438
0 24_1iiv-sp.png 1000 1400 N N 9182 51385 product 9886 M 0 9886
0 24_1iiv-sp.png 1000 1400 N N 9209 51386 product 9886 M 0 9886
0 24_1iiv-sp.png 1000 1400 N N 9236 51387 product 9886 M 0 9886
0 24_1iiv-sp.png 1000 1400 N N 9263 51388 product 9886 M 0 9886
0 24_1iiv-sp.png 1000 1400 N N 9290 51389 product 9886 M 0 9886
0 50_0u78-kr.png 1000 1400 N N 2461 135 product 9991 M 10 9991
0 50_0u78-kr.png 1000 1400 N N 8522 51326 product 9991 M 10 9991