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 (62582, 62408, 62165, 62173) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00110

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": 47,
          "filtered": 100,
          "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'A' and cscart_images_links.object_id in (62582,62408,62165,62173)"
        }
      }
    },
    "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
20272 62165 product 0 32088 A 0 D 0 0 Wallaby-stem-16in-997-raw-brass-200-white-RIB.jpg 16" Wallaby, 997-Natural Raw Brass, With Cap Option, Guard in 200-White, Mounting in 997-Natural Raw Brass, Decorative Canopy Cover 1000 1000 32088
21570 62408 product 0 33451 A 0 D 0 0 sydney-stem-16in-100-black-390-teal-CLR.jpg 16" Sydney LED, 100-Black, Guard in 390-Teal, CLR-Clear Glass, Mounting in 980-Brushed Aluminum 1000 1000 33451
22167 62582 product 0 34059 A 0 D 0 0 outback-stem-12in-997-raw-brass-200-white-TGG-RIB-decorative.jpg 12" Outback, 997-Natural Raw Brass, With Cap Option, Guard in 200-White, RIB-Ribbed Glass, Decorative Canopy Cover 1000 1000 34059
30644 62173 product 0 42876 A 0 D 0 0 brisbane-stem-14in-380-chartreuse-100-black-heavy-duty-canopy-RIB.jpg 14" Brisbane, 380-Chartreuse, Guard in 100-Black, RIB-Ribbed Glass, Mounting in 100-Black, Heavy Duty Canopy 1000 1000 42876
20224 62173 product 0 32040 A 1 D 0 0 brisbane-stem-12in-100-black-CLR.jpg 12" Brisbane, 100-Black, CLR-Clear Glass 1000 1000 32040
20273 62165 product 0 32089 A 1 D 0 0 Wallaby-stem-14in-barn-red-RIB.jpg 14" Wallaby, 400-Barn Red, RIB-Ribbed Glass 1000 1000 32089
21571 62408 product 0 33452 A 1 D 0 0 sydney-stem-12in-400-barn-red-ribRIB.jpg 12" Sydney LED, 400-Barn Red, RIB-Ribbed Glass 1000 1000 33452
66756 62582 product 0 78989 A 1 D 0 0 outback-stem-20in-307-emerald-green-TGG-FST.jpg 20" Outback, 307-Emerald Green, FST-Frosted Glass 1000 1000 78989
21572 62408 product 0 33453 A 2 D 0 0 sydney-stem-14in-705-navy-490-magenta-CLR.jpg 14" Sydney LED, 705-Navy, Guard in 490-Magenta, CLR-Clear Glass 1000 1000 33453
66410 62173 product 0 78643 A 2 D 0 0 brisbane-stem-14in-400-barn-red-CLR.jpg 14" Brisbane, 400-Barn Red, CLR-Clear Glass 1000 1000 78643
66755 62582 product 0 78988 A 2 D 0 0 outback-stem-18in-100-black-TGG-RIB-Heavy-Duty.jpg 18" Outback, 100-Black, RIB-Ribbed Glass, Heavy Duty Canopy 1000 1000 78988
29854 62408 product 0 42077 A 3 D 0 0 sydney-stem-18in-975-galvanized-400-barn-red-CLR-HSC.jpg 18" Sydney LED, 975-Galvanized, Guard in 400-Barn Red, CLR-Clear Glass, Hang Straight Canopy 1000 1000 42077
66163 62165 product 0 78396 A 3 D 0 0 Wallaby-stem-16in-100-black-500-buttery-yellow-TGG-RIB.jpg 16" Wallaby, 100-Black, Guard in 500-Buttery Yellow, RIB-Ribbed Glass, Heavy Duty Stem Mount Canopy, Mounting in 100-Black 1000 1000 78396
66411 62173 product 0 78644 A 3 D 0 0 brisbane-stem-16in-390-teal-480-blush-pink-975-galvanized-HSC-RIB.jpg 16" Brisbane, 390-Teal, Guard in 480-Blush Pink, RIB-Ribbed Glass, Mounting in 975-Galvanized, Hang Straight Canopy 1000 1000 78644
66757 62582 product 0 78990 A 3 D 0 0 outback-stem-20in-700-royal-blue-975-galvanized-TGG-RIB-HSC.jpg 20" Outback, 700-Royal Blue, Guard in 975-Galvanized, RIB-Ribbed Glass, Hang Straight Canopy, Mounting in 975-Galvanized 1000 1000 78990
22169 62582 product 0 34061 A 4 D 0 0 outback-stem-12in-975-galvanized-400-barn-red-TGG-FST.jpg 12" Outback, 975-Galvanized, Guard in 400-Barn Red, FST-Frosted Glass 1000 1000 34061
66164 62165 product 0 78397 A 4 D 0 0 Wallaby-stem-12in-390-teal-CLR.jpg 12" Wallaby, 390-Teal, CLR-Clear Glass 1000 1000 78397
66299 62408 product 0 78532 A 4 D 0 0 sydney-stem-12in-307-emerald-green-RIB.jpg 12" Sydney LED, 307-Emerald Green, With Cap Option, RIB-Ribbed Glass 1000 1000 78532
66412 62173 product 0 78645 A 4 D 0 0 brisbane-stem-16in-500-buttery-yellow-975-galvanized-RIB.jpg 16" Brisbane, 975-Galvanized, Guard in 500-Buttery Yellow, RIB-Ribbed Glass 1000 1000 78645
66165 62165 product 0 78398 A 5 D 0 0 Wallaby-stem-16in-480-blush-pink-490-magenta-CLR.jpg 16" Wallaby, 480-Blush Pink, Guard in 490-Magenta, CLR-Clear Glass, Mounting in 480-Blush Pink 1000 1000 78398
66300 62408 product 0 78533 A 5 D 0 0 sydney-stem-16in-200-white-RIB_1a2n-1r.jpg 16" Sydney LED, 200-White, RIB-Ribbed Glass 1000 1000 78533
66413 62173 product 0 78646 A 5 D 0 0 brisbane-stem-16in-700-royal-200-white-RIB.jpg 16" Brisbane, 700-Royal Blue, Guard in 200-White, RIB-Ribbed Glass, Mounting in 200-White 1000 1000 78646
66754 62582 product 0 78987 A 5 D 0 0 outback-stem-16in-400-barn-red-TGG-FST.jpg 16" Outback, 400-Barn Red, FST-Frosted Glass 1000 1000 78987
20225 62173 product 0 32041 A 6 D 0 0 brisbane-stem-12in-307-emerald-green-CLR.jpg 12" Brisbane, 307-Emerald Green, CLR-Clear Glass 1000 1000 32041
22171 62582 product 0 34063 A 6 D 0 0 outback-stem-14in-200-white-TGG-RIB.jpg 14" Outback, 200-White, RIB-Ribbed Glass 1000 1000 34063
66166 62165 product 0 78399 A 6 D 0 0 Wallaby-stem-14in-975-galvanized-400-barn-red-RIB-HSC.jpg 14" Wallaby, 975-Galvanized, Guard in 400-Barn Red, RIB-Ribbed Glass, HSC-Hang Straight Canopy, Mounting in 975-Galvanized 1000 1000 78399
66301 62408 product 0 78534 A 6 D 0 0 sydney-stem-14in-500-buttery-yellow-100-black-RIB-Heavy-Duty-Canopy.jpg 14" Sydney LED, 500-Buttery Yellow, Guard in 100-Black, RIB-Ribbed Glass, Mounting in 100-Black, Heavy Duty Canopy 1000 1000 78534
53578 62173 product 0 65811 A 7 C 0 0 brisbane_stem_mount_14in_barn_red_clearglass2.jpg 14” Brisbane Stem Mount Pendant, 400-Barn Red, With Cap, Hang Straight Canopy, 400-Barn Red Guard, Clear Glass | Photo Courtesy of Houses and Barns by John Libby and Izzy Bouchard Photography 1500 1071 65811
62194 62582 product 0 74427 A 7 C 0 0 Outback-Stem-mount-975-400-galvanized-barn-red.jpg 14" Outback, 975-Galvanized, Guard in 400-Barn Red, Mounting in 975-Galvanized 1500 1000 74427
66167 62165 product 0 78400 A 7 D 0 0 Wallaby-stem-12in-307-emerald-green-RIB.jpg 12" Wallaby, 307-Emerald Green, RIB-Ribbed Glass 1000 1000 78400
66302 62408 product 0 78535 A 7 D 0 0 sydney-stem-18in-715-delphite-blue-200-white-RIB_tgm0-b5.jpg 18" Sydney LED, 715-Delphite Blue, Guard in 200-White, RIB-Ribbed Glass 1000 1000 78535
20621 62165 product 0 32448 A 8 C 0 0 wallaby-400-barn-red-tybee-island.jpg 12" Wallaby, 400-Barn Red with 975-Galvanized Guard, With Cap, CLR-Clear Glass 600 900 32448
53579 62173 product 0 65812 A 8 C 0 0 brisbane_stem_mount_14in_barn_red_clearglass3.jpg 14” Brisbane Stem Mount Pendant, 400-Barn Red, With Cap, Hang Straight Canopy, 400-Barn Red Guard, Clear Glass | Photo Courtesy of Houses and Barns by John Libby and Izzy Bouchard Photography 1500 1000 65812
64289 62582 product 0 76522 A 8 C 0 0 image4-residential-exterior-porch-entryway-Outback-Stem_Mount-Pendant-20in-995-Raw-Copper-36in-stem-106-Matte-Black-Cap-Guard-106-Matte-Black-Ribbed-Glass.jpeg 20" Outback, 995-Raw Copper, 36" stem, 106-Matte Black Cap Guard, 106-Matte Black, Ribbed Glass | Photo Courtesy of Homeowner 1477 1971 76522
68137 62408 product 0 80370 A 8 C 0 0 image2-residential-exterior-lighting-porch-Sydney-LED-Stem-Mount-Pendant-18in-100-Black-24in-stem-No-Cap-HDC-Ribbed-Glass.jpeg 18" Sydney LED, 100-Black, 24" Stem, No Cap, Heavy Duty Canopy, Ribbed Glass | Customer Submission 3024 3587 80370
55928 62582 product 0 68161 A 9 C 0 0 Barn_Light_Electric_-_Outback_Stem_Mount_Pendant_Light_Black_Red_Guard.jpg 12" Outback, 100-Black with 400-Barn Red Guard 1500 2000 68161
59578 62173 product 0 71811 A 9 C 0 0 Brisbane_Stem_Mount_Pendant_-_400_Barn_Red_Barn_Light_Electric_-_Colorful_Front_Porch_Farmhouse_Stem_Pendant_Lighting.jpg 12” Brisbane Stem Mount Pendants, 470-Watermelon, 12” Stem, No Cap, CLR-Clear Glass | Customer Submission 1500 1999 71811
66480 62408 product 0 78713 A 9 C 0 0 IMG_1728-residential-exterior-lighting-porch-Sydney-LED-Stem-Mount-Pendant-14in-106-Matte-Black-24in-stem-No-Cap-Hang-Straight-Canopy-Ribbed-Glass.jpg 14" Sydney LED, 106-Matte Black, 24" Stem, No Cap, Hang Straight Canopy, Ribbed Glass | Customer Submission 2921 3895 78713
32311 62173 product 0 44544 A 10 C 0 0 industrial_lighting_kitchen_lighting_100_black.jpg 16" Brisbane Stem Mount Pendant, 600-Bronze, No Cap, Hang Straight Canopy, 600-Bronze Guard, FST-Frosted Glass | Photo Courtesy of Christina’s Adventures Blog 1500 2691 44544
59575 62582 product 0 71808 A 10 C 0 0 Outback_Stem_Mount_Pendant_Light_-_975_Galvanized_Barn_Light_Electric_-_Front_Porch_Halloween_Lighting.jpg 18” Outback, 975-Galvanized Shade, 100-Black Stem & Canopy Finish, With Cap, Heavy Duty Canopy, CGG-Standard Cast Guard in 100-Black, Clear Glass | Photo Courtesy of Melissa Ferre 1500 2159 71808
66481 62408 product 0 78714 A 10 C 0 0 IMG_1714-residential-exterior-lighting-porch-Sydney-LED-Stem-Mount-Pendant-14in-106-Matte-Black-12in-stem-No-Cap-Hang-Straight-Canopy-Ribbed-Glass.jpg 14" Sydney LED, 106-Matte Black, 24" Stem, No Cap, Hang Straight Canopy, Ribbed Glass | Customer Submission 4032 3024 78714
32312 62173 product 0 44545 A 11 C 0 0 ceiling_pendant_lighting[1].jpg 16" Brisbane Stem Mount Pendant, 600-Bronze, No Cap, Hang Straight Canopy, 600-Bronze Guard, FST-Frosted Glass | Photo Courtesy of Christina’s Adventures Blog 517 768 44545
62195 62582 product 0 74428 A 11 C 0 0 Outback-Stem-mount-975-400-galvanized-barn-red_ott7-qr.jpg 14" Outback, 975-Galvanized, Guard in 400-Barn Red, Mounting in 975-Galvanized 1500 1328 74428
66482 62408 product 0 78715 A 11 C 0 0 IMG_1716-residential-exterior-lighting-porch-Sydney-LED-Stem-Mount-Pendant-14in-106-Matte-Black-24in-stem-No-Cap-Hang-Straight-Canopy-Ribbed-Glass.jpg 14" Sydney LED, 106-Matte Black, 24" Stem, No Cap, Hang Straight Canopy, Ribbed Glass | Customer Submission 3005 3506 78715
31257 62173 product 0 43490 A 12 C 0 0 ceiling_lights_barn_lights.jpg (3) 16" Brisbane Stem Mount Pendants, 975-Galvanized with 400-Barn Red Guards, 6" Stem, No Cap, CLR-Clear Glass | Customer Submission 768 1024 43490
66483 62408 product 0 78716 A 12 C 0 0 IMG_1727-residential-exterior-lighting-porch-Sydney-LED-Stem-Mount-Pendant-14in-106-Matte-Black-24in-stem-No-Cap-Hang-Straight-Canopy-Ribbed-Glass.jpg 14" Sydney LED, 106-Matte Black, 24" Stem, No Cap, Hang Straight Canopy, Ribbed Glass | Customer Submission 3024 4032 78716
59579 62173 product 0 71812 A 13 C 0 0 Brisbane_Stem_Mount_Pendant_-_Watermelon_Barn_Light_Electric_-_Outdoor_Porch_Lighting.jpg 12” Brisbane Stem Mount Pendants, 470-Watermelon, 12” Stem, No Cap, CLR-Clear Glass | Customer Submission 1500 2000 71812