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 (
    '40744', '40745', '40758', '40759', 
    '40761', '40768', '40769', '40770', 
    '40776', '40788', '40789', '40790', 
    '40791', '40792', '40793', '40794', 
    '40795', '40796', '40809', '40821', 
    '40827', '40828', '40829', '40830', 
    '40831', '40832', '40833', '40834', 
    '40835', '40836', '40837', '40839'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00198

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "228.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "41.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": 41,
            "rows_produced_per_join": 41,
            "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 ('40744','40745','40758','40759','40761','40768','40769','40770','40776','40788','40789','40790','40791','40792','40793','40794','40795','40796','40809','40821','40827','40828','40829','40830','40831','40832','40833','40834','40835','40836','40837','40839')))",
            "cost_info": {
              "read_cost": "81.21",
              "eval_cost": "8.20",
              "prefix_cost": "89.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": 41,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "41.00",
              "eval_cost": "8.20",
              "prefix_cost": "138.61",
              "data_read_per_join": "31K"
            },
            "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": 41,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "41.00",
              "eval_cost": "8.20",
              "prefix_cost": "187.81",
              "data_read_per_join": "24K"
            },
            "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 71y5-kG2vPL._SL1000_.jpg 1000 1000 N 65952 40794 product 67903 A 1 67903
0 71nO97QrypL._SL1000_.jpg 1000 1000 N 65957 40793 product 67908 A 1 67908
0 2439445390000.jpg 569 550 N 65965 40791 product 67916 A 1 67916
0 tw-58426-intex-crystal-pool-blue-15539507050.jpg 1000 1000 N 65998 40792 product 67949 A 1 67949
0 61pVMf2t78L._SL1000_.jpg 1000 1000 N 66004 40795 product 67955 A 1 67955
0 s-l1600_hsac-1n.jpg 1000 1000 N 66207 40821 product 68158 A 1 68158
0 987747065000000000000000000.jpg 569 550 N 66571 40768 product 68522 A 1 68522
0 813a9-fMxfL._SL1000_.jpg 1000 1000 N 66574 40769 product 68525 A 1 68525
0 51DgYFYfGTL._SL1000_.jpg 1000 1000 N 66597 40776 product 68548 A 1 68548
0 A1zPo6f1RkL._SL1500_.jpg 1500 1042 N 66627 40788 product 68578 A 1 68578
0 71-WLk7lUIL._SL1000_.jpg 1000 1000 N 66629 40789 product 68580 A 1 68580
0 71BYGgV7XDL._SL1000_.jpg 1000 1000 N 66638 40827 product 68589 A 1 68589
0 71D37osh0eL._SL1000_.jpg 1000 1000 N 66642 40828 product 68593 A 1 68593
0 71kgEI3Ev7L._SL1000_.jpg 1000 1000 N 66645 40829 product 68596 A 1 68596
0 2796559430.jpg 569 550 N 66651 40831 product 68602 A 1 68602
0 6922.1000.jpg 1000 695 N 66655 40833 product 68606 A 1 68606
0 2796559430_afii-e8.jpg 569 550 N 66661 40831 product 68612 A 1 68612
0 13989134000.jpg 569 550 N 66663 40834 product 68614 A 1 68614
0 154122_1557317993.jpg 500 500 N 66669 40832 product 68620 A 1 68620
0 intex-pool-float-angel-wings-mat-58786eu-P-356281-10757730_3.jpg 470 470 N 66673 40835 product 68624 A 1 68624
0 1609743580000.jpg 569 550 N 66675 40836 product 68626 A 1 68626
0 71fiLt98WRL._SL1000_.jpg 1000 1000 N 66679 40837 product 68630 A 1 68630
0 81wGQybBEZL._SL1500_.jpg 1500 1042 N 66686 40839 product 68637 A 1 68637
0 71lIq8J4JFL._SL1000_.jpg 1000 1000 N 66738 40761 product 68689 A 1 68689
0 969179587000.jpg 569 550 N 65966 40791 product 67917 A 2 67917
0 618TSYAQjcL._SL1000_.jpg 1000 1000 N 66208 40821 product 68159 A 2 68159
0 9ebed47ead1d4969be5bd7f19d03b2d4.jpg 650 650 N 68337 40776 product 70288 A 2 70288
0 71JwMfj64VL._SL1000_.jpg 1000 1000 N 66209 40821 product 68160 A 3 68160
0 58292EP.jpg 500 500 N 68338 40776 product 70289 A 3 70289