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 (
    '9544', '9592', '9593', '9594', '9595', 
    '9596', '9597', '9598', '9599', '9600', 
    '9601', '9602', '9603', '9604', '9605', 
    '9606', '9607', '9608', '9609', '9610', 
    '9611', '9612', '9613', '9614', '9615', 
    '9616', '9617', '9618', '9619', '9620', 
    '9621', '9622'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00275

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "248.01"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "45.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": 45,
            "rows_produced_per_join": 45,
            "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 ('9544','9592','9593','9594','9595','9596','9597','9598','9599','9600','9601','9602','9603','9604','9605','9606','9607','9608','9609','9610','9611','9612','9613','9614','9615','9616','9617','9618','9619','9620','9621','9622')))",
            "cost_info": {
              "read_cost": "86.01",
              "eval_cost": "9.00",
              "prefix_cost": "95.01",
              "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": 45,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "45.00",
              "eval_cost": "9.00",
              "prefix_cost": "149.01",
              "data_read_per_join": "34K"
            },
            "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": 45,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "45.00",
              "eval_cost": "9.00",
              "prefix_cost": "203.01",
              "data_read_per_join": "26K"
            },
            "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 71C2GyhOX7L._SL1500_.jpg 1500 1500 N 25903 9544 product 27865 A 1 27865
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 KSIPH-079-STSG_b_1024x.jpg 1024 1024 N 26195 9613 product 28157 A 1 28157
0 81FackWrMmL._SL1500_.jpg 1500 1500 N 26199 9614 product 28161 A 1 28161
0 81nv44TjT8L._SL1500_.jpg 1500 1500 N 26201 9618 product 28163 A 1 28163
0 71qvfKfB4rL._SL1500_.jpg 1500 1500 N 26204 9617 product 28166 A 1 28166
0 81iDNCe5QgL._SL1500_.jpg 1500 1500 N 26252 9622 product 28214 A 1 28214
0 KSIPH-108-SSCBG_2_vb6s-i9.jpg 600 600 N 26254 9621 product 28216 A 1 28216
0 ksiph-104-rhhcs_3.jpg 1200 1200 N 26255 9616 product 28217 A 1 28217
0 71pFOdrBAaL._SL1500_.jpg 1500 1500 N 25904 9544 product 27866 A 2 27866
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 71RKrgMkGwL._SL1500_.jpg 772 1500 N 26196 9613 product 28158 A 2 28158
0 810-rXNtzML._SL1500_.jpg 1500 1500 N 26202 9618 product 28164 A 2 28164
0 81Xkw9eGZLL._SL1500_.jpg 1500 1500 N 26205 9617 product 28167 A 2 28167
0 81vWfBEto2L._SL1500_.jpg 1500 1500 N 26207 9615 product 28169 A 2 28169
0 811T3e_GV7L._SL1500_.jpg 1500 1500 N 26253 9622 product 28215 A 2 28215
0 ksiph-104-rhhcs_3_gk1h-sf.jpg 1200 1200 N 26256 9616 product 28218 A 2 28218
0 j2lm3m12ork_1024x1024.jpg 900 900 N 26258 9612 product 28220 A 2 28220
0 819ANuaRPaL._SL1500_.jpg 1500 1164 N 25905 9544 product 27867 A 3 27867
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 71Xn-AOS4zL._SL1500_.jpg 766 1500 N 26197 9613 product 28159 A 3 28159
0 81XNL5u7v1L._SL1500_.jpg 1500 1500 N 26200 9614 product 28162 A 3 28162
0 71ucPjXf0eL._SL1500_.jpg 1500 1500 N 26203 9618 product 28165 A 3 28165
0 81rla6yu3kL._SL1500_.jpg 1500 1500 N 26208 9615 product 28170 A 3 28170
0 ksiph-104-rhhcs.jpg 700 700 N 26257 9616 product 28219 A 3 28219
0 wgqqllc1nb4_1024x1024.jpg 900 900 N 26259 9612 product 28221 A 3 28221