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 (
    '47678', 
    '47679', 
    '47680', 
    '47681', 
    '47682', 
    '47683', 
    '47684', 
    '47685', 
    '47686', 
    '47688', 
    '47690', 
    '47691', 
    '47692', 
    '47693', 
    '47694', 
    '47695', 
    '47696', 
    '47697', 
    '47698', 
    '47699', 
    '47700', 
    '47701', 
    '47702', 
    '47703', 
    '47705', 
    '47706', 
    '47707', 
    '47708', 
    '47709', 
    '47710', 
    '47711', 
    '47712', 
    '47714', 
    '47719', 
    '47720', 
    '47721', 
    '47722', 
    '47725', 
    '47730', 
    '47731', 
    '47732', 
    '47733', 
    '47734', 
    '47735', 
    '47736', 
    '47737', 
    '47738', 
    '47739', 
    '47740', 
    '47741', 
    '47742', 
    '47743', 
    '47744', 
    '47745', 
    '47746', 
    '47747', 
    '47748', 
    '47749', 
    '47750', 
    '47751', 
    '47752', 
    '47753', 
    '47754', 
    '47755', 
    '47756', 
    '47757', 
    '47758', 
    '47760', 
    '47761', 
    '47762', 
    '47763', 
    '47764', 
    '47765', 
    '47766', 
    '47767', 
    '47768', 
    '47769', 
    '47770', 
    '47771', 
    '47772', 
    '47773', 
    '47774', 
    '45784', 
    '45785', 
    '45786', 
    '45787', 
    '45788', 
    '45789', 
    '45790', 
    '45791', 
    '45792', 
    '45793', 
    '45794', 
    '45795', 
    '45796', 
    '45797', 
    '45798', 
    '45799', 
    '45800', 
    '45801', 
    '45802', 
    '45803', 
    '45804', 
    '45805', 
    '45806', 
    '45807', 
    '45808', 
    '45809', 
    '45810', 
    '45811', 
    '45812', 
    '45813', 
    '45814', 
    '45815', 
    '45816', 
    '45817', 
    '45818', 
    '45819', 
    '45820', 
    '45821', 
    '45822', 
    '45823', 
    '45824', 
    '45825', 
    '45826', 
    '45827', 
    '45828', 
    '45829'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00953

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "929.61"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "167.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": 167,
            "rows_produced_per_join": 167,
            "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 ('47678','47679','47680','47681','47682','47683','47684','47685','47686','47688','47690','47691','47692','47693','47694','47695','47696','47697','47698','47699','47700','47701','47702','47703','47705','47706','47707','47708','47709','47710','47711','47712','47714','47719','47720','47721','47722','47725','47730','47731','47732','47733','47734','47735','47736','47737','47738','47739','47740','47741','47742','47743','47744','47745','47746','47747','47748','47749','47750','47751','47752','47753','47754','47755','47756','47757','47758','47760','47761','47762','47763','47764','47765','47766','47767','47768','47769','47770','47771','47772','47773','47774','45784','45785','45786','45787','45788','45789','45790','45791','45792','45793','45794','45795','45796','45797','45798','45799','45800','45801','45802','45803','45804','45805','45806','45807','45808','45809','45810','45811','45812','45813','45814','45815','45816','45817','45818','45819','45820','45821','45822','45823','45824','45825','45826','45827','45828','45829')))",
            "cost_info": {
              "read_cost": "328.41",
              "eval_cost": "33.40",
              "prefix_cost": "361.81",
              "data_read_per_join": "15K"
            },
            "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": 167,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "167.00",
              "eval_cost": "33.40",
              "prefix_cost": "562.21",
              "data_read_per_join": "127K"
            },
            "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": 167,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "167.00",
              "eval_cost": "33.40",
              "prefix_cost": "762.61",
              "data_read_per_join": "99K"
            },
            "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 58224-Bestway-41x58cm-Solar-heated-Multiple-SHOWER-For-Outdoor-Adventure-20L-Compact-16x23-Solar-Shower-with.jpg 800 800 N 73171 45784 product 75122 A 1 75122
0 Bestway-2-in-1-Single-1.85M-Aslepa-Air-Bed-6.jpg 800 800 N 73177 45785 product 75128 A 1 75128
0 712ztZys1yL._AC_SL1500_.jpg 1500 436 N 75196 45788 product 77139 A 1 77139
0 710fOHw_2-L._AC_SL1500_.jpg 1500 664 N 75198 45789 product 77141 A 1 77141
0 515jue4DIDL._AC_SL1000_.jpg 1000 667 N 75204 45790 product 77147 A 1 77147
0 20190307132536_bestway_pavillo_67617_grey.jpeg 1015 516 N 75208 45787 product 77151 A 1 77151
0 BESTWAY-NuCamp-Tent-for-4-Adults-4-1.jpg 800 800 N 75213 45791 product 77156 A 1 77156
0 3bc07d7205033ef69b9e15ff4415503a.png 325 143 N 75217 45792 product 77160 A 1 77160
0 9128-FsiurL._AC_SL1500_.jpg 1500 1000 N 75220 45793 product 77163 A 1 77163
0 71EyZE-HlZL._AC_SL1500_.jpg 1500 588 N 75225 45794 product 77168 A 1 77168
0 91Ukgk2KCTL._AC_SL1500_.jpg 848 1500 N 75245 45802 product 77188 A 1 77188
0 91nsAK83YiL._AC_SL1500_.jpg 903 1500 N 75249 45803 product 77192 A 1 77192
0 91h8YaNf3yL._AC_SL1500_.jpg 1000 1500 N 75256 45804 product 77199 A 1 77199
0 71_5FKzqOOL._SL1500_.jpg 1060 1500 N 75261 45805 product 77204 A 1 77204
0 81oZuhyWgsL._AC_SL1500_.jpg 1500 649 N 75263 45806 product 77206 A 1 77206
0 61cM_ZLiteL._AC_SL1368__i0sc-up.jpg 1236 894 N 75272 45807 product 77215 A 1 77215
0 68044-Bestway-2x1-3x0-9m-Beach-X2-Tent-79-x51-x35-Beach-Tent-for-2-with_uoo2-d6.jpg 1141 673 N 75280 45809 product 77223 A 1 77223
0 71kRJkCLKOL._SL1500_.jpg 1500 1457 N 75282 45810 product 77225 A 1 77225
0 71kRJkCLKOL._SL1500__39hp-bf.jpg 1500 1457 N 75285 45810 product 77228 A 1 77228
0 71mXCSXhN2L._AC_SL1500_.jpg 1500 909 N 75299 45815 product 77242 A 1 77242
0 item_XXL_7981614_145545190.jpg 1000 278 N 75306 45818 product 77249 A 1 77249
0 81S8OzVNPpL._SL1500_.jpg 1500 1500 N 75312 45819 product 77255 A 1 77255
0 81upkGInQQL._SL1500_.jpg 1500 1000 N 75313 45820 product 77256 A 1 77256
0 71Ee7XFrr1L._AC_SL1500_.jpg 1500 409 N 75319 45821 product 77262 A 1 77262
0 711YfE6GVKL._AC_SL1500_.jpg 826 1500 N 75323 45822 product 77266 A 1 77266
0 8149jdoJGbL._SL1500_.jpg 1500 1500 N 75329 45823 product 77272 A 1 77272
0 81YRFJ7q2hL._AC_SL1500_.jpg 1500 1159 N 75332 45825 product 77275 A 1 77275
0 Heat-Wrap-400-Sleeping-Bag-Bestway-68072.jpg 1000 667 N 75336 45827 product 77279 A 1 77279
0 512769556u7.jpg 569 550 N 75340 45828 product 77283 A 1 77283
0 516707030u2.jpg 569 550 N 75345 45829 product 77288 A 1 77288
0 81Zqo5wKgOL._SL1500_.jpg 893 1500 N 75381 45800 product 77324 A 1 77324
0 A10DJ1OE7dL._SL1500_.jpg 1000 1500 N 75484 45826 product 77427 A 1 77427
0 819uZcxIofL._UY741_.jpg 524 741 N 75496 45812 product 77439 A 1 77439
0 41gektKaTUL._AC_SY400_.jpg 500 396 N 78183 45814 product 80126 A 1 80126
0 product_44777_1.jpg 800 800 N 78667 47690 product 80610 A 1 80610
0 _322.jpg 898 960 N 79094 47746 product 81037 A 1 81037
0 piscina-para-ninos-bestway-57241-somos-tienda-cod-384-D_NQ_NP_835809-MLV32041257686_092019-F.jpg 1200 1155 N 79098 47750 product 81041 A 1 81041
0 31mTzS0n3iL._SL500_AC_SS350_.jpg 350 350 N 79100 47751 product 81043 A 1 81043
0 1754765855_lodka-naduvnaya-bestway.jpg 1280 1280 N 79102 47752 product 81045 A 1 81045
0 cf81a10edb6858be6f02eff45d1b733b.jpg 500 375 N 79104 47753 product 81047 A 1 81047
0 91U2g2lNufL._SL1500_.jpg 1058 1500 N 79180 47768 product 81123 A 1 81123
0 3120497970.jpg 569 550 N 79182 47769 product 81125 A 1 81125
0 71DjRheWPlL._SL1500_.jpg 1000 1500 N 73172 45784 product 75123 A 2 75123
0 91nsiP7e2_L._AC_SL1500_.jpg 1500 1492 N 75199 45789 product 77142 A 2 77142
0 71NXQIkMGqL._AC_SL1000_.jpg 1000 667 N 75205 45790 product 77148 A 2 77148
0 9cfbbf4a2954242b100abf113289b8f5.jpg 325 243 N 75209 45787 product 77152 A 2 77152
0 BESTWAY-NuCamp-Tent-for-4-Adults-4.jpg 800 800 N 75214 45791 product 77157 A 2 77157
0 713lN9Bh9ZL._AC_SL1500_.jpg 1500 435 N 75221 45793 product 77164 A 2 77164
0 81WLHI1BUCL._AC_SL1500_.jpg 1060 1500 N 75226 45794 product 77169 A 2 77169
0 16662619be4d6744ac49a3b590b992f9.jpg 194 280 N 75242 45801 product 77185 A 2 77185
0 91erlABkzWL._AC_SL1500_.jpg 774 1500 N 75246 45802 product 77189 A 2 77189
0 A1K6qcLXGyL._AC_SL1500_.jpg 997 1500 N 75250 45803 product 77193 A 2 77193
0 91A5juRhUeL._AC_SL1500_.jpg 907 1500 N 75257 45804 product 77200 A 2 77200
0 71tXoZzUbnL._AC_SL1500_.jpg 1060 1500 N 75264 45806 product 77207 A 2 77207
0 loading-large_labeled._CB192238949_.gif 80 104 N 75283 45810 product 77226 A 2 77226
0 loading-large_labeled._CB192238949__r783-uj.gif 80 104 N 75286 45810 product 77229 A 2 77229
0 61dXXoHSEsL._AC_SL1500_.jpg 1500 461 N 75289 45813 product 77232 A 2 77232
0 68053-Bestway-180x75cm-Evade-200-Sleeping-Bag-Hollow-Fiber-Padding-Ideal-Temp-13-16C-170T-Polyester_f36i-jk.jpg 800 533 N 75303 45816 product 77246 A 2 77246
0 item_XXL_7981614_145545206.jpg 1000 711 N 75307 45818 product 77250 A 2 77250
0 A1OHGgZfqsL._SL1500_.jpg 1500 1257 N 75315 45820 product 77258 A 2 77258
0 71_6BBdfmjL._AC_SL1500_.jpg 1500 611 N 75324 45822 product 77267 A 2 77267
0 71UWz7GEN0L._AC_SL1500_.jpg 1320 1500 N 75333 45825 product 77276 A 2 77276
0 Heat-Wrap-400-Sleeping-Bag-Bestway-68072_2lud-gm.jpg 500 283 N 75337 45827 product 77280 A 2 77280
0 91Ukgk2KCTL._SL1500_.jpg 1000 1500 N 75382 45800 product 77325 A 2 77325
0 71xgzhb3wML._SL1500_.jpg 1500 1120 N 75485 45826 product 77428 A 2 77428
0 81iP5Kec7nL._SL1500_.jpg 1500 1000 N 73173 45784 product 75124 A 3 75124
0 816yPf_oZ3L._AC_SL1500_.jpg 1500 835 N 75200 45789 product 77143 A 3 77143
0 8718475707738_g_en_hd_2.jpg 1024 1024 N 75210 45787 product 77153 A 3 77153
0 81vjjCzfDaL._AC_SL1367_.jpg 1367 1200 N 75269 45807 product 77212 A 3 77212
0 81mEPfj-wsL._AC_SL1500_.jpg 1500 800 N 75290 45813 product 77233 A 3 77233
0 81ejZU1bQoL._SL1500_.jpg 1500 724 N 75316 45820 product 77259 A 3 77259
0 71rE2yJQgWL._AC_SL1500_.jpg 1500 510 N 75334 45825 product 77277 A 3 77277
0 91erlABkzWL._SL1500_.jpg 1000 1500 N 75383 45800 product 77326 A 3 77326
0 71NpdCj06QL._SL1500_.jpg 1500 1000 N 75486 45826 product 77429 A 3 77429
0 61lPRbEkn4L._SL1001_.jpg 751 1001 N 73174 45784 product 75125 A 4 75125
0 1016057_8.jpeg 499 332 N 75211 45787 product 77154 A 4 77154
0 81mEPfj-wsL._AC_SL1500__p72c-2y.jpg 1500 800 N 75296 45813 product 77239 A 4 77239
0 81iCXPSseBL._SL1500_.jpg 1060 1500 N 75384 45800 product 77327 A 4 77327
0 81T5I-19oNL._SL1500_.jpg 1500 1000 N 75487 45826 product 77430 A 4 77430
0 71k2BDxHbTL._SL1500_.jpg 1060 1500 N 73175 45784 product 75126 A 5 75126
0 91fIPXdcV2L._SL1500_.jpg 1500 1286 N 75488 45826 product 77431 A 5 77431
0 71XYWGifc4L._AC_SL1369__kpff-46.jpg 1369 929 N 75274 45807 product 77217 A 6 77217
0 71OdCQDqNiL._SL1500_.jpg 1060 1500 N 75489 45826 product 77432 A 6 77432
0 71mAhxVBO7L._AC_SL1369_.jpg 1369 936 N 75271 45807 product 77214 A 7 77214
0 68046-Cultiva-X3-Tent-Pavillo-by-Bestway-p.jpg 1446 973 N 75503 45811 product 77446 A 7 77446
0 palatka-turisticheskaya-trehmestnaya-bestway-68046-cultiva-1-8h1-25-m-photo-d737.jpeg 500 500 N 75504 45811 product 77447 A 8 77447