SELECT 
  cscart_images_links.*, 
  cscart_images.image_path, 
  cscart_common_descriptions.description AS alt, 
  cscart_images.image_x, 
  cscart_images.image_y, 
  cscart_images.image_id as images_image_id 
FROM 
  cscart_images_links 
  LEFT JOIN cscart_images ON cscart_images_links.detailed_id = cscart_images.image_id 
  LEFT JOIN cscart_common_descriptions ON cscart_common_descriptions.object_id = cscart_images.image_id 
  AND cscart_common_descriptions.object_holder = 'images' 
  AND cscart_common_descriptions.lang_code = 'en' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'A' 
  AND cscart_images_links.object_id IN (30013, 64363, 62365, 30012) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00128

JSON explain

{
  "query_block": {
    "select_id": 1,
    "read_sorted_file": {
      "filesort": {
        "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
        "table": {
          "table_name": "cscart_images_links",
          "access_type": "range",
          "possible_keys": ["object_id"],
          "key": "object_id",
          "key_length": "81",
          "used_key_parts": ["object_id", "object_type", "type"],
          "rows": 51,
          "filtered": 100,
          "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'A' and cscart_images_links.object_id in (30013,64363,62365,30012)"
        }
      }
    },
    "table": {
      "table_name": "cscart_images",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["image_id"],
      "ref": ["cscart_migrate.cscart_images_links.detailed_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_images_links.detailed_id = cscart_images.image_id)"
    },
    "table": {
      "table_name": "cscart_common_descriptions",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "107",
      "used_key_parts": ["object_id", "lang_code", "object_holder"],
      "ref": ["cscart_migrate.cscart_images.image_id", "const", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_common_descriptions.object_id = cscart_images.image_id and cscart_common_descriptions.object_holder = 'images' and cscart_common_descriptions.lang_code = 'en' and trigcond(cscart_images.image_id is not null))"
    }
  }
}

Result

pair_id object_id object_type image_id detailed_id type position image_type show_gallery gallery_category_id image_path alt image_x image_y images_image_id
13120 30013 product 0 23181 A 0 D 0 0 anchorage-wall-mountlight-round-white-side.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 200-White Finish (Side View) 600 600 23181
19247 30012 product 0 30959 A 0 D 0 0 amidships-bulkhead-wall-mount-oval-galv-side.jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 975-Galvanized (Side View) 600 600 30959
30756 64363 product 0 42988 A 0 D 0 0 bullet-flush-red.jpg Bullet Flush Mount LED Sign Light, 400-Barn Red 1000 1000 42988
65405 62365 product 0 77638 A 0 D 0 0 Flush-Mount-Industrial-Guard-500-buttery-yellow-CGG-RIB_m82m-ur.jpg Flush Mount LED Guard Sconce, 500-Buttery Yellow, CGG-Standard Cast Guard, RIB-Ribbed Glass 1000 1000 77638
19249 30012 product 0 30961 A 1 D 0 0 amidships-bulkhead-wall-mount-oval-red.jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 400-Barn Red 600 600 30961
19253 30013 product 0 30965 A 1 D 0 0 anchorage-wall-mountlight-round-red.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 400-Barn Red Finish 600 600 30965
58523 64363 product 0 70756 A 1 D 0 0 bullet-flush-galvanized-high-lumen.jpg Bullet Flush Mount LED Sign Light, 975-Galvanized, High Lumen Canopy (For Lumens 2000-4000) 1000 1000 70756
65407 62365 product 0 77640 A 1 D 0 0 Flush-Mount-Industrial-Guard-715-delphite-CGG-CLR_otqd-ni.jpg Flush Mount LED Guard Sconce, 715-Delphite, CGG-Standard Cast Guard, CLR-Clear Glass 1000 1000 77640
19250 30012 product 0 30962 A 2 D 0 0 amidships-bulkhead-wall-mount-oval-red-side.jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 400-Barn Red (Side View) 600 600 30962
19254 30013 product 0 30966 A 2 D 0 0 anchorage-wall-mountlight-round-red-side.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 400-Barn Red Finish (Side View) 600 600 30966
30757 64363 product 0 42989 A 2 D 0 0 bullet-flush-delphite.jpg Bullet Flush Mount LED Sign Light, 715-Delphite PTMP 1000 1000 42989
65408 62365 product 0 77641 A 2 D 0 0 Flush-Mount-Industrial-Guard-975-galvanized-CGG-FST.jpg Flush Mount LED Guard Sconce, 975-Galvanized, CGG-Standard Cast Guard, FST-Frosted Glass 1000 1000 77641
19251 30012 product 0 30963 A 3 D 0 0 amidships-bulkhead-wall-mount-oval-white.jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 200-White 600 600 30963
19255 30013 product 0 30967 A 3 D 0 0 anchorage-wall-mountlight-round-galv.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 975-Galvanized Finish 600 600 30967
21680 62365 product 0 33562 A 3 D 0 0 Flush-Mount-Industrial-Guard-100-black-TGG-RIB.jpg Flush Mount LED Guard Sconce, 100-Black, TGG-Heavy Duty Cast Guard, RIB-Ribbed Glass 1000 1000 33562
30758 64363 product 0 42990 A 3 D 0 0 bullet-flush-white.jpg Bullet Flush Mount LED Sign Light, 200-White 1000 1000 42990
19252 30012 product 0 30964 A 4 D 0 0 amidships-bulkhead-wall-mount-oval-white-side.jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 200-White (Side View) 600 600 30964
19256 30013 product 0 30968 A 4 D 0 0 anchorage-wall-mountlight-round-galv-side.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 975-Galvanized Finish (Side View) 600 600 30968
30759 64363 product 0 42991 A 4 D 0 0 bullet-flush-galvanized.jpg Bullet Flush Mount LED Sign Light, 975-Galvanized 1000 1000 42991
65404 62365 product 0 77637 A 4 D 0 0 Flush-Mount-Industrial-Guard-307-emerald-green-CGG-FST.jpg Flush Mount LED Guard Sconce, 307-Emerald Green, CGG-Standard Cast Guard, FST-Frosted Glass 1000 1000 77637
67872 64363 product 0 80105 A 4 C 0 0 IMG_3844-commercial-interior-lighting-on-hallway-Bullet-Flush-Mount-LED-Sign-Light-500-Buttery-Yellow-LED8-2700k-75-Degree-Wide-Flood-Clear-Glass.jpg Bullet Flush Mount LED Sign Light, 500-Buttery Yellow, LED8, 2700k, 75 Degree Wide Flood, Clear Glass | Customer Submission 3024 3245 80105
67873 64363 product 0 80106 A 4 C 0 0 IMG_3849-commercial-interior-lighting-on-hallway-guitar-Bullet-Flush-Mount-LED-Sign-Light-500-Buttery-Yellow-LED8-2700k-75-Degree-Wide-Flood-Clear-Glass.jpg Bullet Flush Mount LED Sign Light, 500-Buttery Yellow, LED8, 2700k, 75 Degree Wide Flood, Clear Glass | Customer Submission 3006 3673 80106
24495 62365 product 0 36476 A 5 D 0 0 Flush-Mount-Industrial-Guard-200-white-WGG-FST.jpg Flush Mount LED Guard Sconce, 200-White, WGG-Wire Guard, FST-Frosted Glass 1000 1000 36476
53592 30012 product 0 65825 A 5 D 0 0 Amidships-Bulkhead-Wall-Mount-Large-Teal-Above.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 390-Teal 1000 1000 65825
68758 30013 product 0 80991 A 5 C 0 0 InvisionDesign_962Line8_Loft-Staircase_88284-residential-interior-lighting-on-Anchorage-Bulkhead-Wall-Mount-Large-100-Black-stairway.jpg Anchorage Bulkhead Wall Mount, Large, 100-Black | Customer Submission 5300 5299 80991
53593 30012 product 0 65826 A 6 D 0 0 Amidships-Bulkhead-Wall-Mount-Large-Teal-Side.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 390-Teal 1000 1000 65826
56322 30013 product 0 68555 A 6 C 0 0 Anchorage_Bulkhead_Wall_Mount_-_Barn_Light_Electric_-_Nautical_Bunk_Beds.jpg Anchorage Bulkhead Wall Mount Light Fixture, Small Size, 975-Galvanized Finish | Photo Courtesy of Homeowner 426 640 68555
65406 62365 product 0 77639 A 6 D 0 0 Flush-Mount-Industrial-Guard-705-navy-TGG-RIB_nsvs-0z.jpg Flush Mount LED Guard Sconce, 705-Navy, TGG-Heavy Duty Cast Guard, RIB-Ribbed Glass 1000 1000 77639
69135 62365 product 0 81368 A 6 C 0 0 image_50413313-residential-interior-lighting-hallway-Flush-Mount-LED-Guard-Sconce-605-Rust-CGG-Frosted.JPG Flush Mount LED Guard Sconce, 605-Rust, CGG-Standard Cast Guard, FST-Frosted Glass | Photo Courtesy of Customer 1500 2000 81368
54147 30013 product 0 66380 A 7 C 0 0 nautical_lighting_flush_mount_lights-1024x683-768x512.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 975-Galvanized Finish | Photo Courtesy of Homeowner 768 512 66380
67770 30012 product 0 80003 A 7 C 0 0 IMG_2109-residential-interior-lighting-Amidships-Bulkhead-Wall-Mount-Large-300-Dark-Green.JPG Amidships Bulkhead, Large, 300-Dark Green | Customer Submission 3114 3900 80003
62412 30013 product 0 74645 A 8 C 0 0 Anchorage_Bulkhead_Wall_mount_Large_400-BarnRed.jpg Anchorage Bulkhead Wall Mount Light, Large, 400-Barn Red 1500 2000 74645
66218 30012 product 0 78451 A 8 C 0 0 residential-interior-lighting-on-Amidships-Bulkhead-Large-100-Black.jpg Amidships Bulkhead, Large, 100-Black | Photo Courtesy of Dion Williams Design 1500 1875 78451
26034 30012 product 0 38196 A 9 C 0 0 nautical_lighting_exterior_wall_lights_(1024x683).jpg Amidships Bulkhead Wall Mount Light Fixture | Large, 975-Galvanized (Photo Courtesy of Customer) 1024 683 38196
58954 30013 product 0 71187 A 9 C 0 0 Anchorage_Bulkhead_Wall_Mount_Light_-_605_Rust_Barn_Light_Electric_-_Wall_Sconce.jpg Anchorage Bulkhead Wall Mount Light Fixture Small Size, 605-Rust | Photo Courtesy of Homeowner 1500 2000 71187
55537 30013 product 0 67770 A 10 C 0 0 anchorage_bulkhead_light_975_galvanized.jpg Anchorage Bulkhead Wall Mount Light Fixture Large Size, 975-Galvanized Finish | Photo Courtesy of Homeowner 1500 1951 67770
58993 30012 product 0 71226 A 10 C 0 0 Amidship_Bulkhead_Wall_Mount_-_600_Bronze_Barn_Light_Electric_-_Living_Room_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 600-Bronze | Photo Courtesy of Homeowner 1500 1500 71226
58953 30013 product 0 71186 A 11 C 0 0 Anchorage_Bulkhead_Wall_Mount_Light_-_605_Rust_Barn_Light_Electric_-_Wall_Sconce_Light.jpg Anchorage Bulkhead Wall Mount Light Fixture Small Size, 605-Rust | Photo Courtesy of Homeowner 1500 2000 71186
61718 30012 product 0 73951 A 11 C 0 0 Amidship_Bulkhead_Wall_Mount_Light_-_975_Galvanized_Barn_Light_Electric_-_Bedroom_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Small, 975-Galvanized | Photo Courtesy of Traction Architecture and Ryan Gamma Photography 1500 1000 73951
61719 30012 product 0 73952 A 12 C 0 0 Amidships_Bulkhead_Wall_Mount_Light_-_975_Galvanized_Barn_Light_Electric_-_Bedside_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Small, 975-Galvanized | Photo Courtesy of Traction Architecture and Ryan Gamma Photography 1500 1607 73952
64858 30013 product 0 77091 A 12 C 0 0 2E25677E-803C-residential-exterior-lighting-Anchorage-Bulkhead-Large-400-Barn-Red.jpeg Anchorage Bulkhead Wall Mount Light Fixture, Large, 400-Barn Red | Photo Courtesy of Homeowner 4032 3024 77091
61786 30012 product 0 74019 A 13 C 0 0 Amidship_Bulkhead_Wall_Mount_-_975_Galvanized_Barn_Light_Electric.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 975-Galvanized | Photo Courtesy of Homeowner 1500 2000 74019
58992 30012 product 0 71225 A 14 C 0 0 Amidships_Bulkhead_Wall_Mount_-_200_White_Barn_Light_Electric_-_Wall_Mount_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 200-White | Photo Courtesy of Homeowner 1500 1125 71225
60271 30012 product 0 72504 A 15 C 0 0 Amidship_Bulkheads_Wall_Mount_Light_-_100_Black_Barn_Light_Electric_-_Exterior_Home_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Small, 105-Textured Black | Photo Courtesy of Homeowner 1500 1896 72504
62413 30012 product 0 74646 A 16 C 0 0 Amidships_Bulkhead_Light_Small_975_Galvanized.jpg Amidships Bulkhead Wall Mount Light, Small, 975-Galvanized 1500 1837 74646
58979 30012 product 0 71212 A 17 C 0 0 Amidships_Bulkhead_Wall_Mount_Light_-_100_Black_Barn_Light_Electric_-_Barn_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 805-Charcoal Granite | Photo Courtesy of Homeowner 1500 1765 71212
63667 30012 product 0 75900 A 18 C 0 0 residential-interior-porch-lighting-Amidships_Bulkhead_Light_Large_975-Galvanized.jpg Amidships Bulkhead Wall Mount Light, Large, 975-Galvanized | Photo Courtesy of Homeowner 1500 1125 75900
58994 30012 product 0 71227 A 19 C 0 0 Amidships_Bulkhead_Wall_Mount_-_Barn_Light_Electric_-_Hotel_Room_Hallway_Lighting.jpg Amidships Bulkhead Wall Mount Light Fixture, Large, 200-White | Photo Courtesy of Customer 700 450 71227
36931 30012 product 0 49164 A 20 C 0 0 wall_sconce_lighting_nautical_lights-1024x683.jpg (4) Amidships Bulkhead Wall Mount Light Fixture | Large, 975-Galvanized (Photo Courtesy of Customer) 1024 683 49164
66220 30012 product 0 78453 A 21 C 0 0 residential-interior-lighting-Amidships-Bulkhead-Large-100-Black-on.jpg Amidships Bulkhead, Large, 100-Black | Photo Courtesy of Dion Williams Design 1500 1001 78453
66221 30012 product 0 78454 A 22 C 0 0 amidships-bulkhead-living_room.jpg Amidships Bulkhead, Large, 100-Black | Photo Courtesy of Dion Williams Design 1500 1303 78454