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 (
    '9623', '9639', '9640', '9641', '9642', 
    '9643', '9647', '9656', '9659', '9660', 
    '9661', '9662', '9663', '9664', '9665', 
    '9675', '9676', '9677', '9678', '9679', 
    '9686', '9687', '9688', '9689', '9690', 
    '9691', '9692', '9696', '9697', '9698', 
    '9699', '9700'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00214

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 ('9623','9639','9640','9641','9642','9643','9647','9656','9659','9660','9661','9662','9663','9664','9665','9675','9676','9677','9678','9679','9686','9687','9688','9689','9690','9691','9692','9696','9697','9698','9699','9700')))",
            "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 KSIPH-114-GTCBG_KS_iPhoneXR_LiquidGlitter_C.jpg 2100 2100 N 20447 9623 product 22409 M 0 22409
0 KSSA-041-STPWG_ab.jpg 2100 2100 N 20463 9639 product 22425 M 0 22425
0 KSSA-042-STPWG_LS_d728df82-40d6-4ead-8f25-152804300ab3.jpg 800 800 N 20464 9640 product 22426 M 0 22426
0 KP.KSSA045SRG_1.jpg 800 800 N 20465 9641 product 22427 M 0 22427
0 KSSA-046-SRG_2.jpg 800 800 N 20467 9643 product 22429 M 0 22429
0 KSUNV-001-STBWG_02.jpg 2100 2100 N 20471 9647 product 22433 M 0 22433
0 Moshi_iGlaze_For_iPad_Pro_12.9_-_Clear_1.jpg 450 450 N 20480 9656 product 22442 M 0 22442
0 Moshi_Versa_Cover_For_iPad_2017_-_Metro_Black_2.jpg 700 900 N 20483 9659 product 22445 M 0 22445
0 Moshi_Versacover_For_iPad_Pro_12.9_2017_-_Metro_Black_1.jpg 1200 1200 N 20484 9660 product 22446 M 0 22446
0 Moshi_Versa_Cover_For_iPad_Pro_10.5_-_Metro_Black_1.jpg 500 500 N 20485 9661 product 22447 M 0 22447
0 MSHI-H-056007.jpg 1500 1500 N 20486 9662 product 22448 M 0 22448
0 MSHI-H-056008.jpg 1500 1500 N 20487 9663 product 22449 M 0 22449
0 Moshi_Versa_Cover_For_iPad_2017_-_Velvet_Gray_2.jpg 817 768 N 20488 9664 product 22450 M 0 22450
0 Moshi_Versacover_For_iPad_Pro_10.5_-_Sakura_Pink_3.jpg 500 500 N 20489 9665 product 22451 M 0 22451
0 Sensecover_ipx_black_01_Front.jpg 4000 4000 N 20499 9675 product 22461 M 0 22461
0 Sensecover_ipx_pink_01_Front_-_Copy.jpg 4000 4000 N 20500 9676 product 22462 M 0 22462
0 MSHI-H-072531.jpg 1400 1400 N 20501 9677 product 22463 M 0 22463
0 MSHI-H-072532_2.jpg 1600 1600 N 20502 9678 product 22464 M 0 22464
0 Sensecover_ipx_brown_01_Front.jpg 4000 4000 N 20503 9679 product 22465 M 0 22465
0 MSHI-H-088901_LS.jpg 800 800 N 20510 9686 product 22472 M 0 22472
0 Moshi_iPhone_8_Overture_-_Charcoal_Black_1.jpg 225 225 N 20511 9687 product 22473 M 0 22473
0 Moshi_iPhone_8_Plus_Overture_-_Charcoal_Black_2.jpg 750 750 N 20512 9688 product 22474 M 0 22474
0 Overture_iPhone_L_Black_05_Stand.jpg 4000 4000 N 20513 9689 product 22475 M 0 22475
0 MSHI-H-091010.jpg 1600 1600 N 20514 9690 product 22476 M 0 22476
0 MOSHI_Overture_for_iPhone_8_7_6S_6_Plus_Sahara_White.jpg 1280 1280 N 20515 9691 product 22477 M 0 22477
0 MSHI-H-091261_2.jpg 700 700 N 20516 9692 product 22478 M 0 22478
0 iGlaze_Armour_Black_LS_01_copy.jpg 1000 1000 N 20520 9696 product 22482 M 0 22482
0 MSHI-H-101002.jpeg 1600 1600 N 20521 9697 product 22483 M 0 22483
0 moshi_vesta_iphone_x_Herringbone_Gray_1.jpg 225 225 N 20522 9698 product 22484 M 0 22484
0 MSHI-H-101032.jpg 472 472 N 20523 9699 product 22485 M 0 22485
0 iGlaze_iPhone_X_white_01_Front.jpg 4000 4000 N 20524 9700 product 22486 M 0 22486
0 kate-spade-new-york-wrap-inlay-case-for-galaxy-s9-plus---saffiano-black-gold-logo-plate_4_1024x1024.jpg 800 800 N 26212 9642 product 28174 M 0 28174