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
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00279

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "153.26"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "65.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": 65,
            "rows_produced_per_join": 65,
            "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)))",
            "cost_info": {
              "read_cost": "36.26",
              "eval_cost": "6.50",
              "prefix_cost": "42.76",
              "data_read_per_join": "6K"
            },
            "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": 65,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "16.25",
              "eval_cost": "6.50",
              "prefix_cost": "65.51",
              "data_read_per_join": "50K"
            },
            "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": 65,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "16.25",
              "eval_cost": "6.50",
              "prefix_cost": "88.26",
              "data_read_per_join": "38K"
            },
            "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 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_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 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 Group_212.png 1000 1400 N N 5382 38 product 10584 M 0 10584
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 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_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 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