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 (
    '9581', '9582', '9583', '9584', '9585', 
    '9586', '9587', '9588', '9589', '9590', 
    '9591', '9592', '9593', '9594', '9595', 
    '9596', '9597', '9598', '9599', '9600', 
    '9601', '9602', '9603', '9604', '9605', 
    '9606', '9607', '9608', '9609', '9610', 
    '9611', '9612'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00229

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 ('9581','9582','9583','9584','9585','9586','9587','9588','9589','9590','9591','9592','9593','9594','9595','9596','9597','9598','9599','9600','9601','9602','9603','9604','9605','9606','9607','9608','9609','9610','9611','9612')))",
            "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 KG-GDHC003_2.jpg 600 600 N 20405 9581 product 22367 M 0 22367
0 KG-GDHC004.jpg 406 406 N 20406 9582 product 22368 M 0 22368
0 KL-BLC-RUSS_LS2.jpg 800 800 N 20407 9583 product 22369 M 0 22369
0 KL-TRN-TB-UNIV.jpg 440 440 N 20408 9584 product 22370 M 0 22370
0 KNX-K157-1134-MB9F_2.jpg 500 500 N 20409 9585 product 22371 M 0 22371
0 KNX-K161-1005-GD.jpg 550 572 N 20411 9587 product 22373 M 0 22373
0 KNX-K161-1150-BK6F_2.jpg 500 572 N 20412 9588 product 22374 M 0 22374
0 KNX-K166-1126_LS.jpg 800 800 N 20413 9589 product 22375 M 0 22375
0 KNX-K181-1173-BK12F_2.jpg 550 572 N 20414 9590 product 22376 M 0 22376
0 KNX-K8P9FPGD_2.jpg 600 600 N 20415 9591 product 22377 M 0 22377
0 KS-GFTSET-039_D.jpg 2100 2100 N 20416 9592 product 22378 M 0 22378
0 KS-GFTSET-039_D_7691f114-09e0-4a88-badb-ab2c8fb5dc6e.jpg 2100 2100 N 20417 9593 product 22379 M 0 22379
0 KS-GFTSET-041_D.jpg 2100 2100 N 20418 9594 product 22380 M 0 22380
0 KS-GFTSET-044_D_a9a93182-4241-4725-921a-3ffe824d94a3.jpg 2100 2100 N 20419 9595 product 22381 M 0 22381
0 KS-GFTSET-043.jpg 500 500 N 20420 9596 product 22382 M 0 22382
0 KSIPD-010-MGB_LS.jpg 800 800 N 20422 9598 product 22384 M 0 22384
0 KSIPD-010-MGLD_LS.jpg 800 800 N 20423 9599 product 22385 M 0 22385
0 KSIPD-014-PR_2.jpg 800 800 N 20424 9600 product 22386 M 0 22386
0 KSIPD-014-RGG_LS.jpg 800 800 N 20425 9601 product 22387 M 0 22387
0 KSIPH-011-PR_LS.jpg 800 800 N 20426 9602 product 22388 M 0 22388
0 KSIPH-050-BLK_LS.jpg 800 800 N 20427 9603 product 22389 M 0 22389
0 KSIPH-050-SRG_LS.jpg 800 800 N 20428 9604 product 22390 M 0 22390
0 KSIPH-051-GLD.jpeg 1000 1000 N 20429 9605 product 22391 M 0 22391
0 KSIPH-052-FTG_LS.jpg 800 800 N 20430 9606 product 22392 M 0 22392
0 KSIPH-063-MLTG_2.jpg 1500 1500 N 20431 9607 product 22393 M 0 22393
0 KSIPH-076-CSGGL_KS_iPhoneXs_ProtectiveHardshell_C.jpg 2100 2100 N 20432 9608 product 22394 M 0 22394
0 KSIPH-076-CSWGL_Incipio_iPX_ProtectiveHardshell_D.jpg 1000 1000 N 20433 9609 product 22395 M 0 22395
0 KSIPH-076-LBMGF_D.jpg 2100 2100 N 20434 9610 product 22396 M 0 22396
0 KSIPH-076-STPWG_2.jpg 2100 2100 N 20435 9611 product 22397 M 0 22397
0 KSIPH-079-GTCBG-S_KS_iPhoneXs_LiquidGlitter_C.jpg 2100 2100 N 20436 9612 product 22398 M 0 22398
0 2_a327-7v.jpg 640 626 N 82026 9597 product 83969 M 0 83969
0 2_pcpx-0t.jpg 640 626 N 83018 9586 product 84961 M 0 84961