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 (
    '31047', '31053', '31068', '31074', 
    '31082', '31089', '31091', '31117', 
    '31129', '31151', '31155', '31156', 
    '10422', '10429', '10431', '10432', 
    '10433', '10027', '10028', '4579', 
    '4580', '3352', '3353'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00162

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "210.21"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "39.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": 39,
            "rows_produced_per_join": 39,
            "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 ('31047','31053','31068','31074','31082','31089','31091','31117','31129','31151','31155','31156','10422','10429','10431','10432','10433','10027','10028','4579','4580','3352','3353')))",
            "cost_info": {
              "read_cost": "69.81",
              "eval_cost": "7.80",
              "prefix_cost": "77.61",
              "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": 39,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "39.00",
              "eval_cost": "7.80",
              "prefix_cost": "124.41",
              "data_read_per_join": "29K"
            },
            "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": 39,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "39.00",
              "eval_cost": "7.80",
              "prefix_cost": "171.21",
              "data_read_per_join": "23K"
            },
            "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_39246019_152695212.jpg 1000 952 N 8461 3352 product 10426 M 0 10426
0 item_XXL_39240434_152678846.jpg 996 1200 N 8466 3353 product 10431 M 0 10431
0 item_XXL_40597452_1652202715766.jpg 576 584 N 9806 4579 product 11771 M 0 11771
0 item_XXL_39245512_152694261.jpg 1000 1000 N 9811 4580 product 11776 M 0 11776
0 612rG8HLi1L._SL1024_.jpg 1024 1024 N 18518 10027 product 20480 M 0 20480
0 61g_NBBc6IL._SL1413_.jpg 1413 1410 N 18525 10028 product 20487 M 0 20487
0 41JROdh5YZL.jpg 500 500 N 21366 10422 product 23328 M 0 23328
0 s-l1000.jpg 918 1000 N 21391 10433 product 23353 M 0 23353
0 original-xiaomi-mijia-1-5l-electric-water.jpg 640 640 N 26716 10431 product 28678 M 0 28678
0 d9ef723053fdfd2ccc9b6de9c6639271.jpg 850 850 N 26743 10432 product 28705 M 0 28705
0 61aQBHt8c6L._AC_UL436_.jpg 436 392 N 48954 31074 product 50915 M 0 50915
0 41s-DjGTB5L._AC_UL436_.jpg 436 369 N 48961 31068 product 50922 M 0 50922
0 61ytmQM4YVL._SL1000_.jpg 1000 1000 N 49598 31091 product 51559 M 0 51559
0 61mDgKH4GZL._SL1000_.jpg 1000 1000 N 49602 31089 product 51563 M 0 51563
0 61LIFj6m7lL._SL1000_.jpg 1000 1000 N 49611 31082 product 51572 M 0 51572
0 61JFEHaGpuL._SL1000_.jpg 1000 1000 N 49623 31053 product 51584 M 0 51584
0 51vZsUP1iwL._SL1024_.jpg 1024 1024 N 49631 31047 product 51592 M 0 51592
0 61hWZANNSoL._SL1024_.jpg 1024 1024 N 49677 31129 product 51638 M 0 51638
0 517fXlYZHiL._AC_UL436_SEARCH212385_.jpg 436 423 N 49758 31151 product 51719 M 0 51719
0 518-FHG2FPL.jpg 500 500 N 49762 31155 product 51723 M 0 51723
0 download__2__wwqm-i7.jpg 300 300 N 49763 31156 product 51724 M 0 51724
0 meat_tenderizer_web.jpg 640 626 N 53250 31117 product 55211 M 0 55211
0 2_frub-k1.jpg 640 626 N 82099 10429 product 84042 M 0 84042