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 = 'M' 
  AND q_images_links.object_id IN (
    '6950', '6951', '6952', '6953', '6954', 
    '6955', '6956', '6112', '6113', '6114', 
    '6115', '6116', '6117', '6118', '6119', 
    '6120', '6121', '6122', '6123', '6124', 
    '6125', '6126', '6127', '6128', '6129', 
    '6130', '6131', '6132', '6133', '6134', 
    '6135', '6136'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00186

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "185.61"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "32.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": 32,
            "rows_produced_per_join": 32,
            "filtered": "100.00",
            "index_condition": "((`portal`.`q_images_links`.`object_type` = 'product') and (`portal`.`q_images_links`.`type` = 'M') and (`portal`.`q_images_links`.`object_id` in ('6950','6951','6952','6953','6954','6955','6956','6112','6113','6114','6115','6116','6117','6118','6119','6120','6121','6122','6123','6124','6125','6126','6127','6128','6129','6130','6131','6132','6133','6134','6135','6136')))",
            "cost_info": {
              "read_cost": "70.41",
              "eval_cost": "6.40",
              "prefix_cost": "76.81",
              "data_read_per_join": "3K"
            },
            "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": 32,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "32.00",
              "eval_cost": "6.40",
              "prefix_cost": "115.21",
              "data_read_per_join": "24K"
            },
            "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": 32,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "32.00",
              "eval_cost": "6.40",
              "prefix_cost": "153.61",
              "data_read_per_join": "19K"
            },
            "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 BKN-AV10164BT04-GRY.jpg 372 372 N 11527 6112 product 13489 M 0 13489
0 BKN-F2CU050BT04-GLD.jpeg 372 372 N 11529 6113 product 13491 M 0 13491
0 BKN-F3Y017BT5M-BLK.jpeg 160 160 N 11530 6114 product 13492 M 0 13492
0 BKN-F8J023BT04-PNK.jpg 600 600 N 11531 6115 product 13493 M 0 13493
0 BKN-F8J023BT3M-WHT.jpg 372 372 N 11532 6116 product 13494 M 0 13494
0 BKN-F8J144BT04-GLD.png 700 700 N 11533 6117 product 13495 M 0 13495
0 BKN-F8M890BT04-BLK_vx73-ck.jpg 160 160 N 11535 6119 product 13497 M 0 13497
0 BKN-F8J144BT04-GRY.jpg 355 355 N 11536 6118 product 13498 M 0 13498
0 BKN-A3L981BT02MBKHS.jpg 238 387 N 11537 6120 product 13499 M 0 13499
0 BKN-A3L981BT05MBKHS__1_.jpg 238 387 N 11538 6121 product 13500 M 0 13500
0 BKN-AV10126CW06-BLK_LS.jpg 800 800 N 11539 6122 product 13501 M 0 13501
0 BKN-AV10128CW03-BLK.jpeg 372 372 N 11540 6123 product 13502 M 0 13502
0 BKN-AV10128CW03-WHT.jpeg 372 372 N 11541 6124 product 13503 M 0 13503
0 BKN-AV10164BT04-C00_661f5a4c-ff82-4c09-a9f2-b57dcdeec45c__1_.jpg 372 372 N 11542 6125 product 13504 M 0 13504
0 BKN-AV10164BT04-GLD_feb819d0-f663-4e1f-b24e-128d1b4ce393.jpg 372 372 N 11543 6126 product 13505 M 0 13505
0 BKN-AV10175BT2M-BLK.jpeg 372 372 N 11544 6127 product 13506 M 0 13506
0 BKN-F2CD080BT06_1.jpg 372 372 N 11545 6128 product 13507 M 0 13507
0 BKN-F2CU012BT2M-BLK_1_9a761f86-aad6-4cb5-9585-12786a2ff276__1_.jpg 372 372 N 11546 6129 product 13508 M 0 13508
0 BKN-F2CU012BT2M-WHT__1_.jpeg 372 372 N 11547 6130 product 13509 M 0 13509
0 BKN-F2CU021BT04-BLK__1_.jpg 372 372 N 11548 6131 product 13510 M 0 13510
0 BKN-F2CU021BT04-C00_ac72bf22-7009-4fae-a966-7a9b576ef938__1_.jpg 372 372 N 11549 6132 product 13511 M 0 13511
0 https-__cdn.shopify.com_s_files_1_0009_5354_8852_products_BKN-F3Y017BT1.5MBLK.jpg 437 704 N 11551 6136 product 13513 M 0 13513
0 BKN-F2CU050BT04-SLV.jpeg 1000 1000 N 11552 6135 product 13514 M 0 13514
0 BKN-F2CU021BT04-GRY_6dc622a4-3403-4630-a93f-767e237ada4c.jpg 372 372 N 11553 6134 product 13515 M 0 13515
0 BKN-F2CU021BT04-GLD_86dcd555-eb23-4374-8039-9031e6606fa6.jpg 372 372 N 11554 6133 product 13516 M 0 13516
0 270763_sized_544x500_rev_1.jpg 431 500 N 15144 6950 product 17106 M 0 17106
0 product_2948136.jpg 800 800 N 15147 6951 product 17109 M 0 17109
0 CL-TS115K.jpeg 205 245 N 15148 6952 product 17110 M 0 17110
0 obrazek.jpeg 700 560 N 15149 6953 product 17111 M 0 17111
0 product_3376424.jpg 800 800 N 15150 6954 product 17112 M 0 17112
0 118ae48b7f005056b74f71.jpg 330 330 N 15152 6955 product 17114 M 0 17114
0 62c9fa898bd72b5274c5b3c074e67eb1--mmf250x250.jpg 250 250 N 15154 6956 product 17116 M 0 17116