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 (
    '8227', '8228', '8229', '8230', '8231', 
    '4579', '4580', '4581', '4582', '4583', 
    '4584', '3341', '3342', '3343', '3344', 
    '3345'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00189

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "131.21"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "24.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": 24,
            "rows_produced_per_join": 24,
            "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 ('8227','8228','8229','8230','8231','4579','4580','4581','4582','4583','4584','3341','3342','3343','3344','3345')))",
            "cost_info": {
              "read_cost": "44.81",
              "eval_cost": "4.80",
              "prefix_cost": "49.61",
              "data_read_per_join": "2K"
            },
            "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": 24,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "24.00",
              "eval_cost": "4.80",
              "prefix_cost": "78.41",
              "data_read_per_join": "18K"
            },
            "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": 24,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "24.00",
              "eval_cost": "4.80",
              "prefix_cost": "107.21",
              "data_read_per_join": "14K"
            },
            "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 item_XXL_33449039_131105023.jpg 1000 1000 N 8425 3343 product 10390 A 1 10390
0 51ve5jVfJgL._SY300_QL70_.jpg 300 300 N 17171 8227 product 19133 A 1 19133
0 61QQqiIML2L._SX466_.jpg 466 466 N 17173 8228 product 19135 A 1 19135
0 item_XXL_28942637_85003837.jpg 232 424 N 83958 4584 product 13362 A 1 13362
0 item_XXL_33449039_131105061.jpg 1000 1000 N 8426 3343 product 10391 A 2 10391
0 item_XXL_28942637_85003871.jpg 78 440 N 83959 4584 product 13363 A 2 13363
0 item_XXL_24470487_35989117.jpg 643 666 N 8422 3343 product 10387 A 3 10387
0 41EkzYj7uEL._SX466_.jpg 466 466 N 17172 8228 product 19134 A 3 19134
0 item_XXL_28942637_85003894.jpg 240 424 N 83960 4584 product 13364 A 3 13364
0 item_XXL_24470487_35989119.jpg 617 399 N 8423 3343 product 10388 A 4 10388
0 item_XXL_45960231_103daf2e6caaf.jpg 680 456 N 8413 3341 product 10378 A 10 10378
0 item_XXL_40112470_86f9dde8ef0ce.jpg 420 969 N 8418 3342 product 10383 A 10 10383
0 item_XXL_42531389_b2bac46663ed9.jpg 720 720 N 8428 3344 product 10393 A 10 10393
0 item_XXL_36652583_143608127.jpg 395 808 N 8433 3345 product 10398 A 10 10398
0 item_XXL_40597452_a84c2f911bac8.jpg 944 768 N 9807 4579 product 11772 A 10 11772
0 item_XXL_39245512_20f9b50521202.jpg 1000 1000 N 9812 4580 product 11777 A 10 11777
0 item_XXL_39240455_62776d52148f4.jpg 1000 1000 N 9816 4582 product 11781 A 10 11781
0 item_XXL_22105794_29332785.jpg 1000 535 N 9822 4583 product 11787 A 10 11787
0 51YdCUSBkoL._SX466_.jpg 466 466 N 17175 8229 product 19137 A 10 19137
0 415E4bpAFGL.jpg 333 500 N 17177 8230 product 19139 A 10 19139
0 item_L_39248760_152702480.jpg 203 300 N 17179 8231 product 19141 A 10 19141
0 item_XXL_45960231_7f6af47eb7f5c.jpg 704 480 N 8414 3341 product 10379 A 20 10379
0 item_XXL_40112470_8d5e309ce8ca4.jpg 425 985 N 8419 3342 product 10384 A 20 10384
0 item_XXL_42531389_cc3d676460735.jpg 1000 1000 N 8429 3344 product 10394 A 20 10394
0 item_XXL_41146031_1de543eee30c9.jpg 424 904 N 8434 3345 product 10399 A 20 10399
0 item_XXL_40597452_a2aab985d8e05.jpg 1000 442 N 9808 4579 product 11773 A 20 11773
0 item_XXL_39240455_6d91033862b0c.jpg 1000 1000 N 9817 4582 product 11782 A 20 11782
0 item_XXL_45960231_eaf5aa9b3ce43.jpg 800 555 N 8415 3341 product 10380 A 30 10380
0 item_XXL_40112470_9eba1d641ac99.jpg 407 969 N 8420 3342 product 10385 A 30 10385
0 item_XXL_42531389_82e8d6afdfdcd.jpg 1000 1000 N 8430 3344 product 10395 A 30 10395
0 item_XXL_41146031_21238c45f3a05.jpg 1000 645 N 8435 3345 product 10400 A 30 10400
0 item_XXL_40597452_72bca6d73d4c6.jpg 600 600 N 9809 4579 product 11774 A 30 11774
0 item_XXL_39245512_884b1907065b6.jpg 712 896 N 9813 4580 product 11778 A 30 11778
0 item_XXL_39240455_f4d899cba62e6.jpg 1000 988 N 9818 4582 product 11783 A 30 11783
0 item_XXL_22105794_29332788.jpg 1000 382 N 9823 4583 product 11788 A 30 11788
0 item_XXL_45960231_0ba57d5df90c3.jpg 1000 913 N 8416 3341 product 10381 A 40 10381
0 item_XXL_40112470_0fbfc017e0aca.jpg 1000 1000 N 8421 3342 product 10386 A 40 10386
0 item_XXL_42531389_94b1128368df4.jpg 1000 814 N 8431 3344 product 10396 A 40 10396
0 item_XXL_41146031_1194ee6997c4c.jpg 752 800 N 8436 3345 product 10401 A 40 10401
0 item_XXL_40597452_9eabfe69a2206.jpg 986 600 N 9810 4579 product 11775 A 40 11775
0 item_XXL_39240455_baa4fe91de9ba.jpg 768 912 N 9819 4582 product 11784 A 40 11784
0 item_XXL_39240455_2259a91bf1862.jpg 1000 1000 N 9820 4582 product 11785 A 50 11785