SELECT 
  q_images.*, 
  q_images_links.*, 
  q_common_descriptions.description AS alt, 
  q_images.image_id AS images_image_id 
FROM 
  q_images_links 
  LEFT JOIN q_images ON q_images_links.detailed_id = q_images.image_id 
  LEFT JOIN q_common_descriptions ON q_common_descriptions.object_id = q_images.image_id 
  AND q_common_descriptions.object_holder = 'images' 
  AND q_common_descriptions.lang_code = 'en' 
WHERE 
  q_images_links.object_type = 'product' 
  AND q_images_links.type = 'A' 
  AND q_images_links.object_id IN (
    '10514', '10341', '10353', '10366', 
    '10367', '10371', '10372', '10373', 
    '10374', '10022', '10026', '10031', 
    '10033', '10035', '10036', '10037', 
    '10038', '10041', '10042', '10045', 
    '10046', '10048', '10051', '8682', 
    '8214', '4584'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00597

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "270.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "51.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "q_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": 51,
            "rows_produced_per_join": 51,
            "filtered": "100.00",
            "index_condition": "((`portal`.`q_images_links`.`object_type` = 'product') and (`portal`.`q_images_links`.`type` = 'A') and (`portal`.`q_images_links`.`object_id` in ('10514','10341','10353','10366','10367','10371','10372','10373','10374','10022','10026','10031','10033','10035','10036','10037','10038','10041','10042','10045','10046','10048','10051','8682','8214','4584')))",
            "cost_info": {
              "read_cost": "87.21",
              "eval_cost": "10.20",
              "prefix_cost": "97.41",
              "data_read_per_join": "4K"
            },
            "used_columns": [
              "pair_id",
              "object_id",
              "object_type",
              "image_id",
              "detailed_id",
              "type",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "q_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "image_id"
            ],
            "key_length": "4",
            "ref": [
              "portal.q_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 51,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "51.00",
              "eval_cost": "10.20",
              "prefix_cost": "158.61",
              "data_read_per_join": "39K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ],
            "attached_condition": "<if>(is_not_null_compl(q_images), (`portal`.`q_images_links`.`detailed_id` = `portal`.`q_images`.`image_id`), true)"
          }
        },
        {
          "table": {
            "table_name": "q_common_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "lang_code",
              "object_holder"
            ],
            "key_length": "107",
            "ref": [
              "portal.q_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 51,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "51.00",
              "eval_cost": "10.20",
              "prefix_cost": "219.81",
              "data_read_per_join": "30K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ],
            "attached_condition": "<if>(is_not_null_compl(q_common_descriptions), (`portal`.`q_common_descriptions`.`object_id` = `portal`.`q_images`.`image_id`), true)"
          }
        }
      ]
    }
  }
}

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 3f56034b-b320-4ea9-9e6c-13ff7316f30e.jpg 1000 1000 N 18185 8682 product 20147 A 1 20147
0 61CgJx9g04L._SL1000_.jpg 1000 1000 N 18549 10033 product 20511 A 1 20511
0 41H3wVLGxmL._SL1000_.jpg 1000 1000 N 18585 10045 product 20547 A 1 20547
0 2-mi-bluetooth-speaker-red.png 450 350 N 18645 10037 product 20607 A 1 20607
0 item_XXL_28942637_85003837.jpg 232 424 N 83958 4584 product 13362 A 1 13362
0 312vmp5r6_L_4zqs-7d.jpg 500 500 N 85011 10051 product 20620 A 1 20620
0 410ySkBfwYL._SL1000__1dhl-o2.jpg 1000 1000 N 85021 10046 product 20635 A 1 20635
0 61gsgjuphzl._sl1200_.jpg 1200 1200 N 85023 10041 product 20684 A 1 20684
0 Huami-Amazfit-Stratos-Smartwatch-2-734x490.jpg 734 490 N 18186 8682 product 20148 A 2 20148
0 5114gWxeiiL._SL1000_.jpg 1000 1000 N 18550 10033 product 20512 A 2 20512
0 31ak945mYiL.jpg 500 500 N 18586 10045 product 20548 A 2 20548
0 item_XXL_28942637_85003871.jpg 78 440 N 83959 4584 product 13363 A 2 13363
0 31mlzkeZsZL_t5r2-dw.jpg 500 500 N 85012 10051 product 20621 A 2 20621
0 51gWSWjvhUL.jpg 500 500 N 85024 10041 product 20685 A 2 20685
0 Xiaomi-Huami-Amazfit-2-Amazfit-Stratos-Pace.jpg_350x350.jpg 350 350 N 18187 8682 product 20149 A 3 20149
0 thumb_d_gallery_8492e33b.jpg 800 800 N 18646 10037 product 20608 A 3 20608
0 item_XXL_28942637_85003894.jpg 240 424 N 83960 4584 product 13364 A 3 13364
0 51LkYD-HeUL._SL1000__e8xo-0a.jpg 1000 1000 N 85013 10051 product 20622 A 3 20622
0 mi-bluetooth-speaker-speaker-bluetooth-2x3w-rosso.jpg 669 801 N 18647 10037 product 20609 A 4 20609
0 41T3e3H8I8L._SL1000__nugc-0g.jpg 1000 1000 N 85014 10051 product 20623 A 4 20623
0 51o7_Su85XL._SL1000__63yp-2r.jpg 1000 1000 N 85015 10051 product 20624 A 5 20624
0 41ubw9XNB4L.jpg 500 500 N 17146 8214 product 19108 A 10 19108
0 616_3j_2gSL._SL1000_.jpg 1000 1000 N 18498 10022 product 20460 A 10 20460
0 31lXXUO6rHL.jpg 500 357 N 18515 10026 product 20477 A 10 20477
0 31SR7f_A-jL.jpg 500 500 N 18540 10031 product 20502 A 10 20502
0 41YrUtRWTSL.jpg 500 500 N 18554 10035 product 20516 A 10 20516
0 612x3LcfNeL._SL1000_.jpg 1000 1000 N 18561 10038 product 20523 A 10 20523
0 714BTmseJ-L._SL1500_.jpg 1500 563 N 18572 10042 product 20534 A 10 20534
0 719TRP7uhfL._SL1128_.jpg 1128 1128 N 18592 10048 product 20554 A 10 20554
0 51HlmveOfnL._SX522_.jpg 522 522 N 20996 10341 product 22958 A 10 22958
0 31g2VHALKoL.jpg 500 500 N 21046 10353 product 23008 A 10 23008
0 51fuwt4jTPL._SL1132_.jpg 1132 827 N 21089 10367 product 23051 A 10 23051
0 31aaEA1-qDL.jpg 500 375 N 21108 10371 product 23070 A 10 23070
0 61yLwJwHTOL._SX522_.jpg 522 522 N 21110 10372 product 23072 A 10 23072
0 51STvdXXTkL._SX522_.jpg 522 522 N 21113 10373 product 23075 A 10 23075
0 61bWKXNGqnL._SX522_.jpg 522 522 N 21117 10374 product 23079 A 10 23079
0 4142_teh5rL._SX342_.jpg 342 342 N 21833 10514 product 23795 A 10 23795
0 41j6a36kqlL.jpg 500 500 N 17147 8214 product 19109 A 20 19109
0 61dqIdLIVgL._SL1000_.jpg 1000 1000 N 18499 10022 product 20461 A 20 20461
0 41lGT6-sx-L.jpg 500 356 N 18516 10026 product 20478 A 20 20478
0 41qU8TDNisL.jpg 500 500 N 18541 10031 product 20503 A 20 20503
0 41nZYN1t5JL.jpg 500 500 N 18555 10035 product 20517 A 20 20517
0 71oab1MTuDL._SL1500_.jpg 1500 750 N 18573 10042 product 20535 A 20 20535
0 61YPs7sy3GL._SL1500_.jpg 1500 480 N 18593 10048 product 20555 A 20 20555
0 51XHjH7cqkL._SX522_.jpg 522 522 N 20997 10341 product 22959 A 20 22959
0 51Uz1uTyJaL._SL1151_.jpg 1151 822 N 21090 10367 product 23052 A 20 23052
0 61MM2PAWqrL._SX522_.jpg 522 522 N 21111 10372 product 23073 A 20 23073
0 61u9LRfjeAL._SX522_.jpg 522 522 N 21114 10373 product 23076 A 20 23076
0 61R-ulxxb9L._SX522_.jpg 522 522 N 21118 10374 product 23080 A 20 23080
0 41mnlsMfCUL._SX342_.jpg 342 342 N 21834 10514 product 23796 A 20 23796
0 51Ecn63vt9L._SL1000_.jpg 1000 1000 N 18500 10022 product 20462 A 30 20462
0 31bDC7XJMmL.jpg 500 356 N 18517 10026 product 20479 A 30 20479
0 419QwrJYmaL.jpg 500 500 N 18542 10031 product 20504 A 30 20504
0 41iLh0M3-wL._SL1000_.jpg 1000 1000 N 18556 10035 product 20518 A 30 20518
0 71WAHtMvGCL._SL1500_.jpg 1500 844 N 18574 10042 product 20536 A 30 20536
0 61PgtOxbnGL._SL1500_.jpg 1500 595 N 18594 10048 product 20556 A 30 20556
0 5152NsryVtL._SL1143_.jpg 1143 811 N 21091 10367 product 23053 A 30 23053
0 61aKj4CBC_L._SX522_.jpg 522 522 N 21115 10373 product 23077 A 30 23077
0 41MOkuZG2PL._SX342_.jpg 342 342 N 21835 10514 product 23797 A 30 23797
0 81b0fKGzzEL._SL1500_.jpg 1500 1493 N 18501 10022 product 20463 A 40 20463
0 41R3MCfnTcL.jpg 500 500 N 18543 10031 product 20505 A 40 20505
0 51ksDlDaeLL._SL1092_.jpg 790 1092 N 18557 10035 product 20519 A 40 20519
0 71kIOr0rh9L._SL1440_.jpg 1280 1440 N 18575 10042 product 20537 A 40 20537
0 81mH4ghPisL._SL1500_.jpg 1500 844 N 18576 10042 product 20538 A 50 20538
0 71eRYS9KOAL._SL1440_.jpg 1280 1440 N 18577 10042 product 20539 A 60 20539