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 = 'en' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    12684, 12694, 12704, 12689, 12685, 12686, 
    12687, 12688, 12714, 12724, 12734, 
    12719, 12715, 12716, 12717, 12718, 
    13260, 13261, 13262, 13263, 13264, 
    13265, 13266, 13267, 13268, 13269, 
    13270, 13271, 13272, 13273, 13127, 
    13128, 13129, 13130, 13131, 13132, 
    13133, 12464, 12474, 12484, 12469, 
    12465, 12466, 12467, 12468, 12624, 
    12634, 12644, 12629, 12625, 12626, 
    12627, 12628, 12654, 12664, 12674, 
    12659, 12655, 12656, 12657, 12658, 
    13148, 13149, 13151, 13153, 13155, 
    13157, 13159, 13161, 13152, 12928, 
    13134, 13136, 13138, 13140, 13142, 
    13144, 13146, 12929, 12752, 12762, 
    12772, 12757, 12753, 12754, 12755, 
    12756
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00327

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "223.86"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "94.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": 94,
            "rows_produced_per_join": 94,
            "filtered": "100.00",
            "index_condition": "((`test2_gaseus`.`cscart_images_links`.`object_type` = 'product') and (`test2_gaseus`.`cscart_images_links`.`type` = 'M') and (`test2_gaseus`.`cscart_images_links`.`object_id` in (12684,12694,12704,12689,12685,12686,12687,12688,12714,12724,12734,12719,12715,12716,12717,12718,13260,13261,13262,13263,13264,13265,13266,13267,13268,13269,13270,13271,13272,13273,13127,13128,13129,13130,13131,13132,13133,12464,12474,12484,12469,12465,12466,12467,12468,12624,12634,12644,12629,12625,12626,12627,12628,12654,12664,12674,12659,12655,12656,12657,12658,13148,13149,13151,13153,13155,13157,13159,13161,13152,12928,13134,13136,13138,13140,13142,13144,13146,12929,12752,12762,12772,12757,12753,12754,12755,12756)))",
            "cost_info": {
              "read_cost": "54.66",
              "eval_cost": "9.40",
              "prefix_cost": "64.06",
              "data_read_per_join": "8K"
            },
            "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": [
              "test2_gaseus.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 94,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "23.50",
              "eval_cost": "9.40",
              "prefix_cost": "96.96",
              "data_read_per_join": "71K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ]
          }
        },
        {
          "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": [
              "test2_gaseus.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 94,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "23.50",
              "eval_cost": "9.40",
              "prefix_cost": "129.86",
              "data_read_per_join": "55K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ]
          }
        }
      ]
    }
  }
}

Result

image_id image_path image_x image_y is_high_res pair_id object_id object_type detailed_id type position alt images_image_id
0 1549537407-27672_600x600_2x.jpg 500 365 N 11936 12464 product 15419 M 0 15419
0 1549537407-27672_600x600_2x_kyjf-vi.jpg 500 365 N 11937 12465 product 15420 M 0 15420
0 1549537407-27672_600x600_2x_29m5-m2.jpg 500 365 N 11938 12466 product 15421 M 0 15421
0 1549537407-27672_600x600_2x_5kjh-b6.jpg 500 365 N 11939 12467 product 15422 M 0 15422
0 1549537407-27672_600x600_2x_1diw-7l.jpg 500 365 N 11940 12468 product 15423 M 0 15423
0 1549537407-27672_600x600_2x_ue7k-ic.jpg 500 365 N 11941 12469 product 15424 M 0 15424
0 1549537407-27672_600x600_2x_mxeq-ip.jpg 500 365 N 11946 12474 product 15429 M 0 15429
0 1549537407-27672_600x600_2x_bueo-l8.jpg 500 365 N 11956 12484 product 15439 M 0 15439
0 1551266366-16176-1-2_600x600_2x.jpg 500 202 N 12096 12624 product 15579 M 0 15579
0 1551266366-16176-1-2_600x600_2x_jv3z-53.jpg 500 202 N 12097 12625 product 15580 M 0 15580
0 1551266366-16176-1-2_600x600_2x_byhp-2q.jpg 500 202 N 12098 12626 product 15581 M 0 15581
0 1551266366-16176-1-2_600x600_2x_fbqh-k2.jpg 500 202 N 12099 12627 product 15582 M 0 15582
0 1551266366-16176-1-2_600x600_2x_3zap-4b.jpg 500 202 N 12100 12628 product 15583 M 0 15583
0 1551266366-16176-1-2_600x600_2x_8me2-wh.jpg 500 202 N 12101 12629 product 15584 M 0 15584
0 1380013200-5963_600x600_2x.jpg 500 250 N 12106 12634 product 15589 M 0 15589
0 1380013200-5963_600x600_2x_k9qd-pw.jpg 500 250 N 12116 12644 product 15599 M 0 15599
0 1380006508-15716-1_600x600_2x.jpg 500 255 N 12126 12654 product 15609 M 0 15609
0 1380006508-15716-1_600x600_2x_53rk-mi.jpg 500 255 N 12127 12655 product 15610 M 0 15610
0 1380006508-15716-1_600x600_2x_ezsp-ed.jpg 500 255 N 12128 12656 product 15611 M 0 15611
0 1380006508-15716-1_600x600_2x_f6x4-qz.jpg 500 255 N 12129 12657 product 15612 M 0 15612
0 1380006508-15716-1_600x600_2x_nqau-nx.jpg 500 255 N 12130 12658 product 15613 M 0 15613
0 1380006508-15716-1_600x600_2x_mwvn-vh.jpg 500 255 N 12131 12659 product 15614 M 0 15614
0 1380016986-4514_600x600_2x.jpg 500 255 N 12136 12664 product 15619 M 0 15619
0 1380016986-4514_600x600_2x_71g1-4m.jpg 500 255 N 12146 12674 product 15629 M 0 15629
0 1380094497-13333_600x600_2x.jpg 500 238 N 12156 12684 product 15639 M 0 15639
0 1380094497-13333_600x600_2x_ke9e-pi.jpg 500 238 N 12157 12685 product 15640 M 0 15640
0 1380094497-13333_600x600_2x_bww4-na.jpg 500 238 N 12158 12686 product 15641 M 0 15641
0 1380094497-13333_600x600_2x_y3fu-q6.jpg 500 238 N 12159 12687 product 15642 M 0 15642
0 1380094497-13333_600x600_2x_0xkl-xn.jpg 500 238 N 12160 12688 product 15643 M 0 15643
0 1380094497-13333_600x600_2x_h9jx-hl.jpg 500 238 N 12161 12689 product 15644 M 0 15644
0 1380099760-24167_600x600_2x.jpg 500 238 N 12166 12694 product 15649 M 0 15649
0 1380099760-24167_600x600_2x_kta3-50.jpg 500 238 N 12176 12704 product 15659 M 0 15659
0 1380098192-13835_600x600_2x.jpg 500 334 N 12186 12714 product 15669 M 0 15669
0 1380098192-13835_600x600_2x_v96j-kb.jpg 500 334 N 12187 12715 product 15670 M 0 15670
0 1380098192-13835_600x600_2x_i5gw-xd.jpg 500 334 N 12188 12716 product 15671 M 0 15671
0 1380098192-13835_600x600_2x_tbys-k8.jpg 500 334 N 12189 12717 product 15672 M 0 15672
0 1380098192-13835_600x600_2x_amsd-9o.jpg 500 334 N 12190 12718 product 15673 M 0 15673
0 1380098192-13835_600x600_2x_ykyl-ic.jpg 500 334 N 12191 12719 product 15674 M 0 15674
0 1380522728-22669_600x600_2x.jpg 500 334 N 12196 12724 product 15679 M 0 15679
0 1380522728-22669_600x600_2x_qkj1-l6.jpg 500 334 N 12206 12734 product 15689 M 0 15689
0 1380094497-13333_600x600_2x_05qq-w1.jpg 500 238 N 12224 12752 product 15707 M 0 15707
0 1380094497-13333_600x600_2x_ke9e-pi_95uw-uz.jpg 500 238 N 12225 12753 product 15708 M 0 15708
0 1380094497-13333_600x600_2x_bww4-na_bmm7-p6.jpg 500 238 N 12226 12754 product 15709 M 0 15709
0 1380094497-13333_600x600_2x_y3fu-q6_ooem-hr.jpg 500 238 N 12227 12755 product 15710 M 0 15710
0 1380094497-13333_600x600_2x_0xkl-xn_9rfl-45.jpg 500 238 N 12228 12756 product 15711 M 0 15711
0 1380094497-13333_600x600_2x_h9jx-hl_ux5x-hz.jpg 500 238 N 12229 12757 product 15712 M 0 15712
0 1380099760-24167_600x600_2x_sl1d-h6.jpg 500 238 N 12234 12762 product 15717 M 0 15717
0 1380099760-24167_600x600_2x_kta3-50_szx5-xm.jpg 500 238 N 12244 12772 product 15727 M 0 15727
0 410901_600x600.jpg 600 430 N 18641 12928 product 22122 M 0 22122
0 Seite-68-SE-10-300K-LabLinehhetSQbq1WfDf_600x600.jpg 600 400 N 18642 12929 product 22123 M 0 22123
0 Seite-63-474-310-BS-50-300-LabLine_600x600.jpg 600 400 N 18840 13127 product 22321 M 0 22321
0 Seite-63-474-310-BS-50-300-LabLinepB4avxtQSV3da_600x600.jpg 600 400 N 18841 13128 product 22322 M 0 22322
0 Seite-63-474-310-BS-50-300-LabLineJwpphJcukclTh_600x600.jpg 600 400 N 18842 13129 product 22323 M 0 22323
0 Seite-63-474-310-BS-50-300-LabLinev6trbPfjN5C8I_600x600.jpg 600 400 N 18843 13130 product 22324 M 0 22324
0 Seite-63-474-310-BS-50-300-LabLinerjkWUnF3lxOhu_600x600.jpg 600 400 N 18844 13131 product 22325 M 0 22325
0 Seite-63-474-310-BS-50-300-LabLinelsAAWOot1HEfG_600x600.jpg 600 400 N 18845 13132 product 22326 M 0 22326
0 Seite-63-474-310-BS-50-300-LabLineB7L85hw9QqMTW_600x600.jpg 600 400 N 18846 13133 product 22327 M 0 22327
0 Seite-68-SE-10-300K-LabLine_600x600.jpg 600 400 N 18847 13134 product 22328 M 0 22328
0 Seite-68-SE-10-300K-LabLineKGvrUQ1I9ZlqW_600x600.jpg 600 400 N 18849 13136 product 22330 M 0 22330
0 Seite-68-SE-10-300K-LabLine1zRoBjd0Pe37z_600x600.jpg 600 400 N 18851 13138 product 22332 M 0 22332
0 Seite-68-SE-10-300K-LabLine4HjNc2r9LAUtZ_600x600.jpg 600 400 N 18853 13140 product 22334 M 0 22334
0 Seite-68-SE-10-300K-LabLineeEKRHI7paiXSD_600x600.jpg 600 400 N 18855 13142 product 22336 M 0 22336
0 Seite-68-SE-10-300K-LabLinejl90AtceKO2fC_600x600.jpg 600 400 N 18857 13144 product 22338 M 0 22338
0 Seite-68-SE-10-300K-LabLineOAEUPf8atBq9r_600x600.jpg 600 400 N 18859 13146 product 22340 M 0 22340
0 Seite-68-SE-10-300K-LabLine-LG_600x600.jpg 600 400 N 18861 13148 product 22342 M 0 22342
0 Seite-68-SE-10-300K-LabLine-LGZS6nx8a9W1PKI_600x600.jpg 600 400 N 18862 13149 product 22343 M 0 22343
0 Seite-68-SE-10-300K-LabLine-LGuegeKPlHRwntI_600x600.jpg 600 400 N 18864 13151 product 22345 M 0 22345
0 Seite-68-SE-10-300K-LabLine-LGgXodSkIt6qlRE_600x600.jpg 600 400 N 18865 13152 product 22346 M 0 22346
0 Seite-68-SE-10-300K-LabLine-LGH9hVI7YZ2IaLA_600x600.jpg 600 400 N 18866 13153 product 22347 M 0 22347
0 Seite-68-SE-10-300K-LabLine-LGsP0rx3NSA0QuW_600x600.jpg 600 400 N 18868 13155 product 22349 M 0 22349
0 Seite-68-SE-10-300K-LabLine-LGywG1fz3KXdIxH_600x600.jpg 600 400 N 18870 13157 product 22351 M 0 22351
0 Seite-68-SE-10-300K-LabLine-LGDIC8RCYzwyCx7_600x600.jpg 600 400 N 18872 13159 product 22353 M 0 22353
0 Seite-68-SE-10-300K-LabLine-LGIkcMdIAuz4M2j_600x600.jpg 600 400 N 18874 13161 product 22355 M 0 22355
0 1352909787-9956_600x600.jpg 500 432 N 18973 13260 product 22454 M 0 22454
0 1352909917-11095_600x600.jpg 500 432 N 18974 13261 product 22455 M 0 22455
0 1352910019-12077_600x600.jpg 500 432 N 18975 13262 product 22456 M 0 22456
0 1352910107-12773_600x600.jpg 500 432 N 18976 13263 product 22457 M 0 22457
0 1352910172-13360_600x600.jpg 500 432 N 18977 13264 product 22458 M 0 22458
0 1352910250-13930_600x600.jpg 500 432 N 18978 13265 product 22459 M 0 22459
0 1352910330-14542_600x600.jpg 500 432 N 18979 13266 product 22460 M 0 22460
0 x474851_600x600.jpg 500 432 N 18980 13267 product 22461 M 0 22461
0 1352908615-31041_600x600.jpg 500 432 N 18981 13268 product 22462 M 0 22462
0 1352908724-31983_600x600.jpg 500 432 N 18982 13269 product 22463 M 0 22463
0 1352908865-458_600x600.jpg 500 432 N 18983 13270 product 22464 M 0 22464
0 1352908973-1131_600x600.jpg 500 432 N 18984 13271 product 22465 M 0 22465
0 1352909064-2041_600x600.jpg 500 432 N 18985 13272 product 22466 M 0 22466
0 1352909171-3271_600x600.jpg 500 432 N 18986 13273 product 22467 M 0 22467