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 (
    '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.00180

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "217.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 ('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": "76.81",
              "eval_cost": "7.80",
              "prefix_cost": "84.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": "131.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": "178.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 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 NU-G-97-PC-GRY_LS.jpg 800 800 N 20612 9788 product 22574 M 0 22574
0 STM-222-104G-01_2.jpg 500 500 N 20695 9874 product 22657 M 0 22657
0 STM-222-104GZ-01_LS.jpg 800 800 N 20696 9875 product 22658 M 0 22658
0 STM-222-104GZ-25_LS.jpg 800 800 N 20697 9876 product 22659 M 0 22659
0 STM-222-104GZ-29_LS.jpg 800 800 N 20698 9877 product 22660 M 0 22660
0 STM-222-129JX-01_LS.jpg 800 800 N 20699 9878 product 22661 M 0 22661
0 STM-222-129JX-25_LS2.jpg 800 800 N 20700 9879 product 22662 M 0 22662
0 STM-222-161JW-01.jpg 560 560 N 20701 9880 product 22663 M 0 22663
0 STM-222-163JV-01.jpg 1200 1200 N 20702 9881 product 22664 M 0 22664
0 STM-222-165JV-01.jpg 500 500 N 20703 9882 product 22665 M 0 22665
0 STM-222-165JV-04.jpg 800 626 N 20704 9883 product 22666 M 0 22666
0 STM-222-165JV-29.jpg 225 225 N 20705 9884 product 22667 M 0 22667
0 STM-222-165JW-01.jpg 488 488 N 20706 9885 product 22668 M 0 22668
0 STM-222-165JW-02_2.jpg 1117 1500 N 20707 9886 product 22669 M 0 22669
0 STM-222-165L-01_1.jpg 815 1024 N 20708 9887 product 22670 M 0 22670
0 STM-222-165L-04_3.jpg 600 600 N 20709 9888 product 22671 M 0 22671
0 STM-222-165L-29_1.jpg 553 553 N 20710 9889 product 22672 M 0 22672
0 STM-222-167L-01.jpg 1500 922 N 20711 9890 product 22673 M 0 22673
0 STM-222-194J-01_2.jpg 225 225 N 20712 9891 product 22674 M 0 22674
0 STM-222-197JV-01.jpg 1500 1174 N 20713 9892 product 22675 M 0 22675
0 STM-222-197JV-02.jpg 1500 1174 N 20714 9893 product 22676 M 0 22676
0 STM-222-197JV-03.jpg 1500 1174 N 20715 9894 product 22677 M 0 22677
0 STM-222-197L-01.jpg 1500 1500 N 20716 9895 product 22678 M 0 22678
0 STM-222-197L-02.jpg 1500 1500 N 20717 9896 product 22679 M 0 22679
0 STM-222-197L-03.jpg 1500 1500 N 20718 9897 product 22680 M 0 22680