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 (
    '9869', '9870', '9871', '9872', '9873', 
    '9874', '9875', '9876', '9877', '9878', 
    '9879', '9880', '9881', '9882', '9883', 
    '9884', '9885', '9886', '9887', '9888', 
    '9889', '9890', '9891', '9892', '9893', 
    '9894', '9895', '9896', '9897', '9898', 
    '9899', '9900'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00179

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "243.21"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "44.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": 44,
            "rows_produced_per_join": 44,
            "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 ('9869','9870','9871','9872','9873','9874','9875','9876','9877','9878','9879','9880','9881','9882','9883','9884','9885','9886','9887','9888','9889','9890','9891','9892','9893','9894','9895','9896','9897','9898','9899','9900')))",
            "cost_info": {
              "read_cost": "84.81",
              "eval_cost": "8.80",
              "prefix_cost": "93.61",
              "data_read_per_join": "4K"
            },
            "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": 44,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "44.00",
              "eval_cost": "8.80",
              "prefix_cost": "146.41",
              "data_read_per_join": "33K"
            },
            "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": 44,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "44.00",
              "eval_cost": "8.80",
              "prefix_cost": "199.21",
              "data_read_per_join": "26K"
            },
            "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 STM-117-169M-01_2.jpg 1500 1000 N 20690 9869 product 22652 M 0 22652
0 bl1_efdb89e0-6f81-4008-aa57-1667ca66cc10.jpg 225 225 N 20691 9870 product 22653 M 0 22653
0 STM-122-094MY-48_LS.jpg 800 800 N 20692 9871 product 22654 M 0 22654
0 STM-122-154M-33_LS.jpg 800 800 N 20693 9872 product 22655 M 0 22655
0 STM-122-154M-33_-_Copy.jpg 800 800 N 20694 9873 product 22656 M 0 22656
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
0 STM-222-202L-01.jpg 3051 1771 N 20719 9898 product 22681 M 0 22681
0 STM-222-216L-01.jpg 1500 1174 N 20720 9899 product 22682 M 0 22682
0 TC-BDA-MB1213_LS.jpg 800 800 N 20721 9900 product 22683 M 0 22683