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 = 'kk' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    51564, 51568, 51569, 51570, 51571, 51572, 
    51573, 51566, 51578, 51579, 51580, 
    51581, 51176, 51175, 51174, 51173, 
    51172, 91, 51169, 51168, 51167, 51166, 
    90, 51171, 51170, 51182, 51181, 51180, 
    51179, 51178, 51177, 93, 51183, 20, 
    51188, 51187, 51186, 51185, 51184, 
    51165, 51164, 51163, 51162, 51161, 
    52, 51194, 51193, 51192, 51191, 51190, 
    51189, 19, 51201, 51200, 51199, 51198, 
    51197, 51196, 51195, 131
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00276

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "154.76"
    },
    "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 (51564,51568,51569,51570,51571,51572,51573,51566,51578,51579,51580,51581,51176,51175,51174,51173,51172,91,51169,51168,51167,51166,90,51171,51170,51182,51181,51180,51179,51178,51177,93,51183,20,51188,51187,51186,51185,51184,51165,51164,51163,51162,51161,52,51194,51193,51192,51191,51190,51189,19,51201,51200,51199,51198,51197,51196,51195,131)))",
            "cost_info": {
              "read_cost": "37.76",
              "eval_cost": "6.50",
              "prefix_cost": "44.26",
              "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": "67.01",
              "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": "89.76",
              "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 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 105 131 product 8703 M 0 8703
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_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 1075 20 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 1080 93 product 9678 M 0 9678
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 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 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 1112 52 product 9710 M 0 9710
0 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 6619 51161 product 9710 M 0 9710
0 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 6622 51162 product 9710 M 0 9710
0 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 6625 51163 product 9710 M 0 9710
0 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 6628 51164 product 9710 M 0 9710
0 shtany_uchur_forester_cv_black_gray_1112_shtanyuchurforestercvblackgray.png 1000 1400 N N 6631 51165 product 9710 M 0 9710
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 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_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6723 51177 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6731 51178 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6739 51179 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6747 51180 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6755 51181 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_chernyy_ru_1740_shtanyuchurallweatherpantslitecvchernyy.png 1000 1400 N N 6763 51182 product 9678 M 0 9678
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6768 51183 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6773 51184 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6778 51185 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6783 51186 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6788 51187 product 9673 M 0 9673
0 shtany_uchur_all_weather_pants_lite_cv_taas_40x30_ru_1348_shtanyuchurallweatherpantslitecvtaas.png 1000 1400 N N 6793 51188 product 9673 M 0 9673
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 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6831 51195 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6839 51196 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6847 51197 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6855 51198 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6863 51199 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6871 51200 product 8703 M 0 8703
0 bryuki_letnie_uchur_tukulan_cv_bezhevyy_ru_3_2051_bryukiletnieuchurtukulancvbezhevyy.png 1000 1400 N N 6879 51201 product 8703 M 0 8703
0 99_zmp6-yo.png 1000 1400 N N 10758 51564 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10759 51568 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10760 51569 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10761 51570 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10762 51571 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10763 51572 product 11721 M 0 11721
0 99_zmp6-yo.png 1000 1400 N N 10764 51573 product 11721 M 0 11721
0 39_iemc-cr.png 1000 1400 N N 12089 51566 product 11978 M 0 11978
0 39_iemc-cr.png 1000 1400 N N 12090 51578 product 11978 M 0 11978
0 39_iemc-cr.png 1000 1400 N N 12091 51579 product 11978 M 0 11978
0 39_iemc-cr.png 1000 1400 N N 12092 51580 product 11978 M 0 11978
0 39_iemc-cr.png 1000 1400 N N 12093 51581 product 11978 M 0 11978