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 (
    '9661', '9662', '9663', '9664', '9665', 
    '9788', '9874', '9875', '9876', '9877', 
    '9878', '9879', '9880', '9881', '9882', 
    '9883', '9884', '9885', '9886', '9887', 
    '9888', '9889', '9890', '9891', '9892', 
    '9893', '9894', '9895', '9896', '9897'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00141

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "202.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "36.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": 36,
            "rows_produced_per_join": 36,
            "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 ('9661','9662','9663','9664','9665','9788','9874','9875','9876','9877','9878','9879','9880','9881','9882','9883','9884','9885','9886','9887','9888','9889','9890','9891','9892','9893','9894','9895','9896','9897')))",
            "cost_info": {
              "read_cost": "73.21",
              "eval_cost": "7.20",
              "prefix_cost": "80.41",
              "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": 36,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "36.00",
              "eval_cost": "7.20",
              "prefix_cost": "123.61",
              "data_read_per_join": "27K"
            },
            "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": 36,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "36.00",
              "eval_cost": "7.20",
              "prefix_cost": "166.81",
              "data_read_per_join": "21K"
            },
            "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 71V0hxf3UKL._SL1500_.jpg 1500 1500 N 25109 9788 product 27071 A 1 27071
0 05__1_.jpg 1600 1600 N 26344 9665 product 28306 A 1 28306
0 mo99mo056021.jpg 450 450 N 26347 9664 product 28309 A 1 28309
0 02__2_.jpg 1600 1600 N 26351 9663 product 28313 A 1 28313
0 01_wewu-bf.jpg 1600 1600 N 26354 9662 product 28316 A 1 28316
0 71ZSOuyMhqL._SL1500_.jpg 1500 1001 N 25110 9788 product 27072 A 2 27072
0 02__1_.jpg 1600 1600 N 26345 9665 product 28307 A 2 28307
0 04__2_.jpg 1600 1600 N 26352 9663 product 28314 A 2 28314
0 04_jd6w-5a.jpg 1600 1600 N 26355 9662 product 28317 A 2 28317
0 03_rxal-w4.jpg 1600 1600 N 26358 9661 product 28320 A 2 28320
0 z.jpg 1500 1500 N 25111 9788 product 27073 A 3 27073
0 03__1_.jpg 1600 1600 N 26346 9665 product 28308 A 3 28308
0 05_vy5y-6l.jpg 1600 1600 N 26353 9663 product 28315 A 3 28315
0 05_wc48-h0.jpg 1600 1600 N 26356 9662 product 28318 A 3 28318
0 04_tg4t-9a.jpg 1600 1600 N 26359 9661 product 28321 A 3 28321
0 zz.jpg 1500 1500 N 25112 9788 product 27074 A 4 27074
0 02_jww8-gu.jpg 1600 1600 N 26360 9661 product 28322 A 4 28322