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 (
    51323, 51322, 51321, 51320, 50, 51324, 
    51158, 51157, 51156, 53, 51160, 51159, 
    51176, 51175, 51174, 51173, 51172, 
    91, 105, 51129, 51128, 51127, 51126, 
    51125, 48, 51361, 30, 51362, 51363, 
    51364, 51365, 82, 51139, 51138, 51137, 
    51136, 51135, 40, 17, 57, 54, 51313, 
    51312, 51314, 51311, 51310, 51246, 
    51245, 51244, 35, 51248, 51247, 16, 
    51194, 51193, 51192, 51191, 51190, 
    51189, 19, 51354, 51353, 43
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00306

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "177.01"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "75.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": 75,
            "rows_produced_per_join": 75,
            "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 (51323,51322,51321,51320,50,51324,51158,51157,51156,53,51160,51159,51176,51175,51174,51173,51172,91,105,51129,51128,51127,51126,51125,48,51361,30,51362,51363,51364,51365,82,51139,51138,51137,51136,51135,40,17,57,54,51313,51312,51314,51311,51310,51246,51245,51244,35,51248,51247,16,51194,51193,51192,51191,51190,51189,19,51354,51353,43)))",
            "cost_info": {
              "read_cost": "42.01",
              "eval_cost": "7.50",
              "prefix_cost": "49.51",
              "data_read_per_join": "7K"
            },
            "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": 75,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "18.75",
              "eval_cost": "7.50",
              "prefix_cost": "75.76",
              "data_read_per_join": "58K"
            },
            "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": 75,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "18.75",
              "eval_cost": "7.50",
              "prefix_cost": "102.01",
              "data_read_per_join": "44K"
            },
            "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 kepka_uchur_low_cap_cv_saas_282_kepkauchurlowcapcvsaas.jpg 1000 1400 N N 282 17 product 8880 M 0 8880
0 kepka_uchur_mid_cap_cv_saas_295_kepkauchurmidcapcvsaas.png 1000 1400 N N 295 16 product 8893 M 0 8893
0 kepka_uchur_street_cv_saas_362_kepkauchurstreetcvsaas.png 800 1000 N N 362 57 product 8960 M 0 8960
0 kepka_uchur_visor_cv_saas_366_kepkauchurvisorcvsaas.png 1000 1400 N N 366 105 product 8964 M 0 8964
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 423 50 product 9021 M 0 9021
0 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 495 53 product 9093 M 0 9093
0 kurtka_uchur_softshell_iacket_cv_saas_518_kurtkauchursoftshelliacketcvsaas.png 1000 1400 N N 518 40 product 9116 M 0 9116
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 528 48 product 9126 M 0 9126
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 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 886 54 product 9484 M 0 9484
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 947 35 product 9545 M 0 9545
0 shapka_uchur_hunter_cv_saas_1012_shapkauchurhuntercvsaas.png 1000 1400 N N 1012 82 product 9610 M 0 9610
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 1071 19 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 1088 91 product 9686 M 0 9686
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 6334 51125 product 9126 M 0 9126
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 6340 51126 product 9126 M 0 9126
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 6346 51127 product 9126 M 0 9126
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 6352 51128 product 9126 M 0 9126
0 kurtka_uchur_warm_lite_down_cv_saas_528_kurtkauchurwarmlitedowncvsaas.png 1000 1400 N N 6358 51129 product 9126 M 0 9126
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 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 6596 51156 product 9093 M 0 9093
0 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 6601 51157 product 9093 M 0 9093
0 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 6606 51158 product 9093 M 0 9093
0 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 6611 51159 product 9093 M 0 9093
0 kurtka_uchur_all_weather_iacket_pro_cv_saas_495_kurtkauchurallweatheriacketprocvsaas.png 1000 1400 N N 6616 51160 product 9093 M 0 9093
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 6691 51172 product 9686 M 0 9686
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 6697 51173 product 9686 M 0 9686
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 6703 51174 product 9686 M 0 9686
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 6709 51175 product 9686 M 0 9686
0 shtany_uchur_all_weather_pants_pro_cv_saas_ru_3_1653_shtanyuchurallweatherpantsprocvsaas.png 1000 1400 N N 6715 51176 product 9686 M 0 9686
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6798 51189 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6803 51190 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6808 51191 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6813 51192 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6818 51193 product 9669 M 0 9669
0 shtany_uchur_all_weather_pants_lite_cv_saas_34x30_ru_1318_shtanyuchurallweatherpantslitecvsaas.png 1000 1400 N N 6823 51194 product 9669 M 0 9669
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 7332 51244 product 9545 M 0 9545
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 7336 51245 product 9545 M 0 9545
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 7340 51246 product 9545 M 0 9545
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 7344 51247 product 9545 M 0 9545
0 futbolka_uchur_mens_t_shirt_cv_saas_ru_2_1491_futbolkauchurmenstshirtcvsaas.png 1000 1400 N N 7348 51248 product 9545 M 0 9545
0 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 7950 51310 product 9484 M 0 9484
0 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 7958 51311 product 9484 M 0 9484
0 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 7966 51312 product 9484 M 0 9484
0 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 7974 51313 product 9484 M 0 9484
0 tolstovka_uchur_hoodie_wind_cv_saas_l_ru_1530_tolstovkauchurhoodiewindcvsaas.png 1000 1400 N N 7982 51314 product 9484 M 0 9484
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 8238 51320 product 9021 M 0 9021
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 8304 51321 product 9021 M 0 9021
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 8370 51322 product 9021 M 0 9021
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 8436 51323 product 9021 M 0 9021
0 kostyum_uchur_bulchut_3v1_cv_saas_423_kostyumuchurbulchut3v1cvsaas.png 1000 1400 N N 8502 51324 product 9021 M 0 9021
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 1476.png 1000 1400 N N 3364 43 product 10034 M 7 10034
0 1476.png 1000 1400 N N 8982 51353 product 10034 M 7 10034
0 1476.png 1000 1400 N N 8989 51354 product 10034 M 7 10034