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 (
    '6415', '6416', '6417', '6418', '6419', 
    '6420', '6421', '6422', '6423', '6424', 
    '6425', '6426', '6427', '6428', '6429', 
    '6430', '6431', '6432', '6433', '6434', 
    '6435', '6436', '6437', '6438', '6439', 
    '6440', '6441', '6442', '6443', '6444', 
    '6445', '6446', '6447', '6448', '6449', 
    '6450', '6451', '6452', '6453', '6454', 
    '6456', '6457', '6458', '6459', '6460', 
    '6461', '6462', '6463', '6464', '6465', 
    '6466', '6467', '6468', '6469', '6470', 
    '6471', '6472', '6473', '6474', '6475', 
    '6476', '6477', '6478', '6479'
  ) 
ORDER BY 
  q_images_links.position, 
  q_images_links.pair_id

Query time 0.00376

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "404.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "71.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": 71,
            "rows_produced_per_join": 71,
            "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 ('6415','6416','6417','6418','6419','6420','6421','6422','6423','6424','6425','6426','6427','6428','6429','6430','6431','6432','6433','6434','6435','6436','6437','6438','6439','6440','6441','6442','6443','6444','6445','6446','6447','6448','6449','6450','6451','6452','6453','6454','6456','6457','6458','6459','6460','6461','6462','6463','6464','6465','6466','6467','6468','6469','6470','6471','6472','6473','6474','6475','6476','6477','6478','6479')))",
            "cost_info": {
              "read_cost": "149.21",
              "eval_cost": "14.20",
              "prefix_cost": "163.41",
              "data_read_per_join": "6K"
            },
            "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": 71,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "71.00",
              "eval_cost": "14.20",
              "prefix_cost": "248.61",
              "data_read_per_join": "54K"
            },
            "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": 71,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "71.00",
              "eval_cost": "14.20",
              "prefix_cost": "333.81",
              "data_read_per_join": "42K"
            },
            "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 100012-Fuel-Prep.jpg 844 1800 N 12860 6469 product 14822 A 1 14822
0 item_XL_42772946_f4176f44b9426.jpg 600 478 N 13475 6423 product 15437 A 10 15437
0 item_XXL_42861416_9d02753902928.jpg 1000 1000 N 13476 6424 product 15438 A 10 15438
0 item_XXL_42861369_85d929e24c8b5.jpg 1000 1000 N 13478 6425 product 15440 A 10 15440
0 item_XXL_30118914_92359088.jpg 509 1200 N 13480 6426 product 15442 A 10 15442
0 item_XL_30118778_92358801.jpg 600 600 N 13481 6427 product 15443 A 10 15443
0 item_XXL_30118758_92358739.jpg 1000 1000 N 13482 6428 product 15444 A 10 15444
0 item_XXL_11569580_16479844.jpg 600 400 N 13483 6431 product 15445 A 10 15445
0 item_XXL_22032649_28572453.jpg 546 1200 N 13485 6441 product 15447 A 10 15447
0 item_XXL_22032647_28572444.jpg 546 1200 N 13486 6442 product 15448 A 10 15448
0 item_XXL_22032643_28572427.jpg 546 1200 N 13487 6443 product 15449 A 10 15449
0 item_XL_42775288_0ba7d16396397.jpg 600 600 N 13488 6444 product 15450 A 10 15450
0 item_XXL_42775208_08cfefb0a614d.jpg 1000 1000 N 13490 6445 product 15452 A 10 15452
0 item_XXL_42037682_6fc21df6c8563.jpg 1000 1000 N 13492 6446 product 15454 A 10 15454
0 item_XXL_36449120_143081554.jpg 810 1200 N 13495 6447 product 15457 A 10 15457
0 item_XXL_42037269_8ae5eb8b57603.jpg 1000 800 N 13497 6448 product 15459 A 10 15459
0 item_XXL_30118751_92358725.jpg 1000 1000 N 13500 6452 product 15462 A 10 15462
0 item_XXL_22109562_29354540.jpg 1000 750 N 13505 6453 product 15467 A 10 15467
0 item_XXL_30118692_92358687.jpg 1000 724 N 13506 6454 product 15468 A 10 15468
0 item_XXL_30118595_92358419.jpg 1000 755 N 13510 6456 product 15472 A 10 15472
0 item_XXL_22109529_29353683.jpg 1000 772 N 13514 6458 product 15476 A 10 15476
0 item_XXL_30118671_92358550.jpg 1000 1000 N 13515 6459 product 15477 A 10 15477
0 item_XXL_30118696_92358610.jpg 1000 659 N 13516 6460 product 15478 A 10 15478
0 item_XXL_30118734_92358696.jpg 1000 1000 N 13518 6461 product 15480 A 10 15480
0 item_XXL_30118760_92358742.jpg 1000 800 N 13519 6462 product 15481 A 10 15481
0 item_XXL_30118798_92358828.jpg 1000 840 N 13520 6463 product 15482 A 10 15482
0 item_XXL_30118829_92358920.jpg 1000 1000 N 13521 6464 product 15483 A 10 15483
0 vitaly_.jpg 800 1091 N 15889 6457 product 17851 A 11 17851
0 item_XXL_42861416_2ac38d0bc33a9.jpg 978 370 N 13477 6424 product 15439 A 20 15439
0 item_XXL_42861369_998800562abea.jpg 1000 1000 N 13479 6425 product 15441 A 20 15441
0 item_XXL_27370469_115812506.jpg 637 1200 N 13484 6431 product 15446 A 20 15446
0 item_XL_42775288_6abbf5fb3e6e5.jpg 600 600 N 13489 6444 product 15451 A 20 15451
0 item_XXL_42775208_4b8aeb117b719.jpg 1000 1000 N 13491 6445 product 15453 A 20 15453
0 item_XXL_42037682_ab8951e719f44.jpg 1000 700 N 13493 6446 product 15455 A 20 15455
0 item_XXL_36449120_143081547.jpg 1000 510 N 13496 6447 product 15458 A 20 15458
0 item_XXL_42037269_ea1584134e02b.jpg 1000 1000 N 13498 6448 product 15460 A 20 15460
0 item_XXL_30118751_92358766.jpg 1000 1000 N 13501 6452 product 15463 A 20 15463
0 item_XXL_30118692_92358626.jpg 1000 634 N 13507 6454 product 15469 A 20 15469
0 item_XXL_30118595_92358440.jpg 1000 908 N 13511 6456 product 15473 A 20 15473
0 item_XXL_30118696_92358632.jpg 1000 994 N 13517 6460 product 15479 A 20 15479
0 item_XXL_42037682_f661cf9158241.jpg 1000 1000 N 13494 6446 product 15456 A 30 15456
0 item_XXL_42037269_6f01b22ba1816.jpg 1000 1000 N 13499 6448 product 15461 A 30 15461
0 item_XXL_30118751_92358757.jpg 1000 1000 N 13502 6452 product 15464 A 30 15464
0 item_XXL_30118692_92358664.jpg 1000 1049 N 13508 6454 product 15470 A 30 15470
0 item_XXL_30118595_92358457.jpg 1000 752 N 13512 6456 product 15474 A 30 15474
0 item_XXL_30118751_92358749.jpg 1000 1000 N 13503 6452 product 15465 A 40 15465
0 item_XXL_30118751_92358740.jpg 1000 1000 N 13504 6452 product 15466 A 50 15466