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 (
    '9581', '9582', '9583', '9584', '9585', 
    '9586', '9587', '9588', '9589', '9590', 
    '9591', '9592', '9593', '9594', '9595', 
    '9596', '9597', '9598', '9599', '9600', 
    '9601', '9602', '9603', '9604', '9605', 
    '9606', '9607', '9608', '9609', '9610', 
    '9611', '9612'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00276

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "238.41"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "43.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": 43,
            "rows_produced_per_join": 43,
            "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 ('9581','9582','9583','9584','9585','9586','9587','9588','9589','9590','9591','9592','9593','9594','9595','9596','9597','9598','9599','9600','9601','9602','9603','9604','9605','9606','9607','9608','9609','9610','9611','9612')))",
            "cost_info": {
              "read_cost": "83.61",
              "eval_cost": "8.60",
              "prefix_cost": "92.21",
              "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": 43,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "43.00",
              "eval_cost": "8.60",
              "prefix_cost": "143.81",
              "data_read_per_join": "32K"
            },
            "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": 43,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "43.00",
              "eval_cost": "8.60",
              "prefix_cost": "195.41",
              "data_read_per_join": "25K"
            },
            "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 KS-GFTSET-044_D.jpg 2100 2100 N 20421 9597 product 22383 A 1 22383
0 75c10d4305d83a54d02652ce7bbbe845f21ab494_05e17c8723a23d017cd336dcb2b4f9468f549d19_KG_GDHC003.jpg 400 400 N 26075 9581 product 28037 A 1 28037
0 2_ecc1479f-e706-461e-b52e-170f436f100b_800x.jpg 650 650 N 26084 9583 product 28046 A 1 28046
0 d712e3f95656f1366e47484e8a8b269b21e0e0ef_125dd7eccdc4637a259dbe1a5028d4c7e4875ca5_BENAWKeyboardLifesaverTransparent2.jpg 440 440 N 26086 9584 product 28048 A 1 28048
0 kanex_k157_1061_sg6i_premium_durabraid_chargesync_usb_1534796450000_1415842.jpg 500 500 N 26087 9585 product 28049 A 1 28049
0 620-5236-S.jpg 550 572 N 26089 9586 product 28051 A 1 28051
0 ad72abbc1d1b6988303d19be56f2f16617cdd99a_468fc216421248f0753e04889c1c7895858b4b46_MacBook_TURQ_GID_500x500-1.jpg 540 540 N 26139 9582 product 28101 A 1 28101
0 412qvCghfDL._SL1000_.jpg 1000 668 N 26141 9587 product 28103 A 1 28103
0 KNX-K161-1150-BK6F_1024x.jpg 550 572 N 26144 9588 product 28106 A 1 28106
0 619-5236-S.jpg 550 572 N 26146 9587 product 28108 A 1 28108
0 61tlK46vc_L._SL1365_.jpg 1365 775 N 26147 9589 product 28109 A 1 28109
0 312wziPlcvL.jpg 432 500 N 26150 9590 product 28112 A 1 28112
0 61zuYjd-NYL._SL1000_.jpg 1000 1000 N 26153 9592 product 28115 A 1 28115
0 KS-GFTSET-039_Ftr02_a301865e-5bbf-4f40-9396-aec5c70eb4eb_1024x.jpg 1024 1024 N 26156 9593 product 28118 A 1 28118
0 ks-gftset-042_2.jpg 700 700 N 26158 9595 product 28120 A 1 28120
0 KS-GFTSET-044_Ftr02_9061575e-ad72-4d3c-872a-9ef0079146b8_1024x_c23v-28.jpg 1024 1024 N 26160 9596 product 28122 A 1 28122
0 B12vMxDyDmS._SL1500_.jpg 1500 1500 N 26164 9598 product 28126 A 1 28126
0 M1_b09d1bcb-3fe2-4079-b54e-f419da9bc116_1024x.jpg 1024 1024 N 26167 9599 product 28129 A 1 28129
0 KSIPD-014-PR_2_1024x.jpg 800 800 N 26169 9600 product 28131 A 1 28131
0 81Z6nU9PXWL._SL1500_.jpg 1500 1500 N 26172 9601 product 28134 A 1 28134
0 91yeTXexgPL._SL1500_.jpg 932 1500 N 26176 9603 product 28138 A 1 28138
0 91GJbH_hPVL._SL1500_.jpg 932 1500 N 26179 9604 product 28141 A 1 28141
0 81Nt1qvn0WL._SL1500_.jpg 1500 1500 N 26182 9605 product 28144 A 1 28144
0 711SD1sm7pL._SL1500_.jpg 1500 1500 N 26185 9606 product 28147 A 1 28147
0 81mgit5TDeL._SL1500_.jpg 1500 1500 N 26187 9607 product 28149 A 1 28149
0 KSIPH-109-CSGGL_KS_iPhoneXsMax_ProtectiveHardshell_A_2048x.jpg 2048 2048 N 26189 9608 product 28151 A 1 28151
0 KSIPH-076-CSWGL_Incipio_iPX_ProtectiveHardshell_D_1024x.jpg 1000 1000 N 26190 9609 product 28152 A 1 28152
0 KSIPH-076-LBMGF_ab_2048x.jpg 2048 2048 N 26192 9610 product 28154 A 1 28154
0 KATE-SPADE-NY-IPHONE-X-PROTECTIVE-HARDSHELL-CASE-STRIPE-2-WHITE-GOLD-000000000006015246-Detail.jpg 800 800 N 26194 9611 product 28156 A 1 28156
0 KNX-K161-1004-SG_2.jpg 225 225 N 20410 9586 product 22372 A 2 22372
0 IL20180807154352622.jpg_210x280x80.jpg 210 280 N 26085 9583 product 28047 A 2 28047
0 538-5033-S.jpg 550 572 N 26088 9585 product 28050 A 2 28050
0 71GktHLBVzL._SL1500_.jpg 1081 1500 N 26140 9582 product 28102 A 2 28102
0 41jXahG6FBL._SL1000_.jpg 1000 668 N 26142 9587 product 28104 A 2 28104
0 Kanex-GoPower-Auto-Indoor-Black-mobile-device-charger-000000000006013698-Gal-2-Detail.jpg 550 572 N 26145 9588 product 28107 A 2 28107
0 71aN1B5fwDL._SL1365_.jpg 1365 775 N 26148 9589 product 28110 A 2 28110
0 1147-5367-S.jpg 550 572 N 26151 9590 product 28113 A 2 28113
0 b7f9ec4df6212dc9dd82b3f08c1779a989337f6c_abd2a0f74f5c91f405892f3f56bc5efd146fde72_Capture.jpg 544 544 N 26152 9584 product 28114 A 2 28114
0 61SSRp2FlqL._SL1000_.jpg 1000 1000 N 26154 9592 product 28116 A 2 28116
0 KS-GFTSET-039_Ftr03_465e3e96-179c-43ff-be16-87f4f374dc47_1024x.jpg 1024 1024 N 26157 9593 product 28119 A 2 28119
0 KS-GFTSET-044_Ftr02_9061575e-ad72-4d3c-872a-9ef0079146b8_1024x.jpg 1024 1024 N 26159 9595 product 28121 A 2 28121
0 KS-GFTSET-044_Ftr04_a9183b04-2ddd-455e-8cbc-00b2acd5e9d6_1024x.jpg 1024 1024 N 26161 9596 product 28123 A 2 28123
0 KS-GFTSET-044_Ftr02_9061575e-ad72-4d3c-872a-9ef0079146b8_1024x_stvd-to.jpg 1024 1024 N 26162 9597 product 28124 A 2 28124
0 81m0bxfVDmL._SL1500_.jpg 1500 1500 N 26165 9598 product 28127 A 2 28127
0 M3_9a15a750-6c1b-4dbe-99ff-1be7e4c9dbab_1024x.jpg 1024 1024 N 26168 9599 product 28130 A 2 28130
0 KSIPD-014-PR_AngledRight_2048x.jpg 2048 2048 N 26170 9600 product 28132 A 2 28132
0 61yVcs_yWWL._SL1500_.jpg 1500 1500 N 26173 9601 product 28135 A 2 28135
0 6a1b9fa64c6cc2eb6d23741af7406a2e.jpg 565 565 N 26175 9602 product 28137 A 2 28137
0 81znt07jzyL._SL1500_.jpg 531 1500 N 26177 9603 product 28139 A 2 28139
0 81b9xu0N4OL._SL1500_.jpg 530 1500 N 26180 9604 product 28142 A 2 28142
0 9178DxsiZYL._SL1500_.jpg 1500 1500 N 26183 9605 product 28145 A 2 28145
0 819LEYYk1dL._SL1500_.jpg 1500 1500 N 26186 9606 product 28148 A 2 28148
0 81zzMNrc5wL._SL1500_.jpg 1500 1500 N 26188 9607 product 28150 A 2 28150
0 KSIPH-076-CSWGL_Incipio_iPX_ProtectiveHardshell_ab_1024x.jpg 1000 1000 N 26191 9609 product 28153 A 2 28153
0 81l1pDbKDjL._SX679_.jpg 679 679 N 26193 9610 product 28155 A 2 28155
0 j2lm3m12ork_1024x1024.jpg 900 900 N 26258 9612 product 28220 A 2 28220
0 622-5236-S.jpg 550 572 N 26090 9586 product 28052 A 3 28052
0 41mA8RnUcGL._SL1000_.jpg 1000 668 N 26143 9587 product 28105 A 3 28105
0 61GDM0XMRWL._SL1500_.jpg 1500 1500 N 26149 9589 product 28111 A 3 28111
0 71-Ucc4i9IL._SL1500_.jpg 1500 1500 N 26155 9592 product 28117 A 3 28117
0 KS-GFTSET-044_Ftr04_1024x.jpg 1024 1024 N 26163 9597 product 28125 A 3 28125
0 71NJedX9wsL._SL1500_.jpg 1500 1500 N 26166 9598 product 28128 A 3 28128
0 KSIPD-014-PR_viewing_2048x.jpg 2048 2048 N 26171 9600 product 28133 A 3 28133
0 91Z7j3g49ZL._SL1500_.jpg 1500 1500 N 26174 9601 product 28136 A 3 28136
0 81DaYRwV32L._SL1500_.jpg 768 1500 N 26178 9603 product 28140 A 3 28140
0 81uJ9SF5XhL._SL1500_.jpg 541 1500 N 26181 9604 product 28143 A 3 28143
0 71a3sXT_L8L._SL1500_.jpg 1500 1500 N 26184 9605 product 28146 A 3 28146
0 wgqqllc1nb4_1024x1024.jpg 900 900 N 26259 9612 product 28221 A 3 28221