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 (65046, 64734, 64928, 64695) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00192

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": 65,
          "filtered": 100,
          "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'A' and cscart_images_links.object_id in (65046,64734,64928,64695)"
        }
      }
    },
    "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
35834 64695 product 0 48067 A 0 D 0 0 union-gooseneck-14in-400-barn-red-G1-975-galvanized-WC.jpg 14" Union, 400-Barn Red, Wire Cage, 975-Galvanized, G1 Straight Arm 1000 1000 48067
37461 64734 product 0 49694 A 0 D 0 0 Aero-gooseneck-12in-997-raw-brass-G15.jpg 12" Aero, 997-Natural Raw Brass, G15 Gooseneck Arm 1000 1000 49694
51450 65046 product 0 63683 A 0 D 0 0 Aero-gooseneck-14in-975-galvanized-G15-CGG-FST.jpg 14" Aero Nautical LED, 975-Galvanized, CGG-Standard Cast Guard, FST-Frosted Glass, G15 Gooseneck Arm 1000 1000 63683
65945 64734 product 0 78178 A 0 C 0 0 IMG_1903-residential-exterior-lighting-Aero-Gooseneck-12in-705-Navy-G17arm-Dusk-to-Dawn-Photocell.jpg 12" Aero, 705-Navy, G17 Arm | Photo Courtesy of Homeowner 2900 3405 78178
37465 64734 product 0 49698 A 1 D 0 0 Aero-gooseneck-16in-307-emerald-G13-WC-975-galvanized.jpg 16" Aero, 307-Emerald Green, Wire Cage, 975-Galvanized, G13 Gooseneck Arm 1000 1000 49698
47714 64928 product 0 59947 A 1 D 0 0 Avalon-gooseneck-LED-12in-997-brass-G24.jpg 12" Avalon LED, 997-Natural Raw Brass, G24 Gooseneck Arm, Decorative Backing Plate & Hex Cover 1000 1000 59947
64147 65046 product 0 76380 A 1 D 0 0 Aero-gooseneck-16in-307-emerald-G24-CGG-RIB-975-Galvanized.jpg 16" Aero Nautical LED, 307-Emerald Green, CGG-Standard Cast Guard, 975-Galvanized, RIB-Ribbed Glass, G24 Gooseneck Arm 1000 1000 76380
37467 64734 product 0 49700 A 2 D 0 0 Aero-gooseneck-16in-490-magenta-100-black-G8.jpg 16" Aero, 490-Magenta, G8 Gooseneck Arm, 100-Black 1000 1000 49700
47715 64928 product 0 59948 A 2 D 0 0 Avalon-gooseneck-LED-12in-705-navy-G26-975-galvanized.jpg 12" Avalon LED, 705-Navy, G26 Gooseneck Arm, 975-Galvanized 1000 1000 59948
51429 65046 product 0 63662 A 2 D 0 0 Aero-gooseneck-12in-400-barn-red-G4-WGG-RIB.jpg 12" Aero Nautical LED, 400-Barn Red, WGG-Wire Guard, RIB-Ribbed Glass, G4 Straight Arm 1000 1000 63662
35830 64695 product 0 48063 A 3 D 0 0 union-gooseneck-16in-200-white-G19-975-galvanized.jpg 16" Union, 200-White, G19 Gooseneck Arm, 975-Galvanized 1000 1000 48063
37469 64734 product 0 49702 A 3 D 0 0 Aero-gooseneck-14in-975-galvanized-G19.jpg 14" Aero, 975-Galvanized, G19 Gooseneck Arm 1000 1000 49702
62918 64928 product 0 75151 A 3 D 0 0 Avalon-gooseneck-LED-14in-999-oil-rubbed-copper-G8.jpg 14" Avalon LED, 999-Natural Oil-Rubbed Copper, G8 Gooseneck Arm, 100-Black 1000 1000 75151
64148 65046 product 0 76381 A 3 D 0 0 Aero-gooseneck-16in-705-navy-G22-CGG-RIB-jpg.jpg 16" Aero Nautical LED, 705-Navy, CGG-Standard Cast Guard, RIB-Ribbed Glass, G22 Gooseneck Arm 1000 1000 76381
35833 64695 product 0 48066 A 4 D 0 0 union-gooseneck-16in-997-raw-brass-G14-TGG-975-galvanized-FST.jpg 16" Union, 997-Natural Raw Brass, TGG-Heavy Duty Cast Guard, 975-Galvanized, FST-Frosted Glass, G14 Gooseneck Arm 1000 1000 48066
37463 64734 product 0 49696 A 4 D 0 0 Aero-gooseneck-14in-200-white-100-black-G35.jpg 14" Aero, 200-White, G35 Gooseneck Arm, 100-Black 1000 1000 49696
55538 65046 product 0 67771 A 4 C 0 0 aero-nautical-led-gooseneck-light-outdoor.jpg 14” Aero Nautical LED, 300-Dark Green, CGG-Standard Cast Guard, G24 Gooseneck Arm, Frosted Glass | Photo Courtesy of Homeowner 640 480 67771
62916 64928 product 0 75149 A 4 D 0 0 Avalon-gooseneck-LED-10in-200-white-G15.jpg 10" Avalon LED, 200-White, G15 Gooseneck Arm 1000 1000 75149
35832 64695 product 0 48065 A 5 D 0 0 union-gooseneck-10in-700-royal-blue-G15.jpg 10" Union, 700-Royal Blue, G15 Gooseneck Arm 1000 1000 48065
37475 64734 product 0 49708 A 5 D 0 0 Aero-gooseneck-12in-390-teal-980-brushed-aluminum-G11.jpg 12" Aero, 390-Teal, G11 Gooseneck Arm, 980-Brushed Aluminum 1000 1000 49708
47716 64928 product 0 59949 A 5 D 0 0 Avalon-gooseneck-LED-12in-400-barn-red-G6.jpg 12" Avalon LED, 400-Barn Red, G6 Gooseneck Arm, 100-Black 1000 1000 59949
55539 65046 product 0 67772 A 5 C 0 0 aero-nautical-led-gooseneck-light-outdoor-2.jpg 14” Aero Nautical LED, 300-Dark Green, CGG-Standard Cast Guard, G24 Gooseneck Arm, Frosted Glass | Photo Courtesy of Homeowner 595 447 67772
35831 64695 product 0 48064 A 6 D 0 0 union-gooseneck-10in-500-buttery-yellow-G3.jpg 10" Union, 500-Buttery Yellow, G3 Straight Arm 1000 1000 48064
37464 64734 product 0 49697 A 6 D 0 0 Aero-gooseneck-16in-300-dark-green-G1.jpg 16" Aero, 300-Dark Green, G1 Straight Arm 1000 1000 49697
57361 65046 product 0 69594 A 6 C 0 0 Aero_Nautical_LED_Gooseneck_Light_-_Barn_Red_Barn_Light_Electric_-_Modern_Exterior_LED_Gooseneck_Garage_Lighting.jpg 12” Aero Nautical LED, 400-Barn Red, WGG-Wire Guard, G11 Gooseneck Arm, Clear Glass | Photo Courtesy of Homeowner 1500 1073 69594
35827 64695 product 0 48060 A 7 C 0 0 copper_gooseneck_lighting-512x76814964089155931635393db0.jpg 10" Union, 995-Natural Raw Copper, G22 Gooseneck Arm, 100-Black, Decorative Copper Backing Plate & Hex Cover | Photo Courtesy of Amy from My Life from Home 512 768 48060
37462 64734 product 0 49695 A 7 C 0 0 coco-and-kelly-astro-gooseneck-delphite.jpg 12" Aero, 715-Delphite, G11 Gooseneck Arms | Featured on Coco + Kelley blog, photo courtesy of Belathée 900 600 49695
57362 65046 product 0 69595 A 7 C 0 0 Aero_Nautical_LED_Gooseneck_Light_-_Barn_Red_Barn_Light_Electric_-_Garage_Gooseneck_Lighting.jpg 12” Aero Nautical LED, 400-Barn Red, WGG-Wire Guard, G11 Gooseneck Arm, Clear Glass | Photo Courtesy of Homeowner 1500 904 69595
62917 64928 product 0 75150 A 7 D 0 0 Avalon-gooseneck-LED-10in-975-galvanized-G32.jpg 10" Avalon LED, 975-Galvanized, G32 Gooseneck Arm 1000 1000 75150
37474 64734 product 0 49707 A 8 C 0 0 14-in-astro-copper-g15.jpg 14" Aero, 995-Natural Raw Copper, G15 Gooseneck Arm, 980-Brushed Aluminum 500 700 49707
47722 64928 product 0 59955 A 8 C 0 0 4.jpg 14" Avalon LED, 150-Porcelain Black, G15 Gooseneck Arm | Courtesy of The Wilsons Build and Permanent Glimpse Photography 900 1350 59955
44523 64734 product 0 56756 A 9 C 0 0 american_made_gooseneck_lighting-537x768.jpg 16” Aero, 420-Orange, G22 Gooseneck Arm | Photos Courtesy of Alison Kandler Interior Design and Mark Lohman Photography 537 768 56756
61707 64695 product 0 73940 A 9 C 0 0 Union_Gooseneck_Light_-_Barn_Light_Electric_-_Exterior_Cabin_Lighting.jpg 14” Union, 300-Dark Green, G26 Gooseneck Arm | Photo Courtesy of Rangeley Building and Remodeling & Jeff Roberts Imaging 1000 1500 73940
47719 64928 product 0 59952 A 10 C 0 0 1_copy.jpg 14" Avalon LED, 150-Porcelain Black, G15 Gooseneck Arm | Courtesy of The Wilsons Build and Permanent Glimpse Photography 900 900 59952
61367 64695 product 0 73600 A 10 C 0 0 Union_Gooseneck_Light_-_Barn_Light_Electric_-_Backyard_Lighting.jpg 14” Union, 650-Bronze, G11 Gooseneck Arm, Dusk-to-Dawn Photocell | Photo Courtesy of Kory Kevin Studio 1000 1114 73600
42509 64695 product 0 54742 A 11 C 0 0 gooseneck_barn_lights-515x768.jpg 14” Union, 300-Dark Green, G15 Gooseneck Arm in 975-Galvanized Finish | Photo Courtesy of the Homeowner 515 768 54742
47717 64928 product 0 59950 A 11 C 0 0 Ashland_LED_Teal_Gooseneck_Light.jpg (2) 10" Avalon LED Gooseneck Lights, 390-Teal, G11 Gooseneck Arm in 975-Galvanized | Photo Courtesy of Homeowner 1500 916 59950
53432 64734 product 0 65665 A 11 C 0 0 Screen_Shot_2020-03-05_at_9.44.11_AM.png 16” Aero, 100-Black, G26 Gooseneck Arm | Photos Courtesy of Remi Stoneman 599 598 65665
57031 64734 product 0 69264 A 12 C 0 0 Aero_Gooseneck_Light_-_150_Black_Barn_Light_Electric_-_Chain_Supported_Gooseneck_Exterior_Black_Lighting.jpg 16” Aero, M103-Marine Grade Black, G65 Gooseneck Arm | Photos Courtesy of Homeowner 1500 1576 69264
58999 64928 product 0 71232 A 12 C 0 0 Avalon_LED_Gooseneck_Light_-_750_Porcelain_Cobalt_Blue_Barn_Light_Electric_-_LED_Exterior_Lighting.jpg Avalon LED, 750-Porcelain Cobalt Blue, G26 Gooseneck Arm, 850 Lumens, 2700K Color Temperature, Flat Lens | Photo Courtesy of Ames Ingham Interiors 1500 1588 71232
42510 64695 product 0 54743 A 13 C 0 0 gooseneck_barn_lighting-768x618.jpg 14” Union, 300-Dark Green, G15 Gooseneck Arm in 975-Galvanized Finish | Photo Courtesy of the Homeowner 768 618 54743
47721 64928 product 0 59954 A 13 C 0 0 2.jpg 14" Avalon LED, 150-Porcelain Black, G15 Gooseneck Arm | Courtesy of The Wilsons Build and Permanent Glimpse Photography 900 900 59954
48331 64734 product 0 60564 A 13 C 0 0 aero-gooseneck-light-975-galvanized.jpg 12” Aero, 975-Galvanized, G1 Straight Gooseneck Arm | Photos Courtesy of Aaron Webster 1500 2250 60564
35828 64695 product 0 48061 A 14 C 0 0 gooseneck_wall_lights_american_made_lighting.jpg 14" Union, 500-Buttery Yellow, G26 Gooseneck Arm | Customer Submission 640 480 48061
49931 64734 product 0 62164 A 14 C 0 0 astro_gooseneck_16in_420_orange_G22arm.jpg 16” Aero, 420-Orange, G22 Gooseneck Arm | Photos Courtesy of Alison Kandler Interior Design and Mark Lohman Photography 1500 2112 62164
56064 64928 product 0 68297 A 14 C 0 0 exterior_barn_lights-586x768_-_Barn_Light_Electric_-_Exterior_Home_Lighting.jpg 12” Avalon LED, 150-Porcelain Black, G11 Gooseneck Arm | Photo Courtesy of Allwood Construction 586 768 68297
58975 64734 product 0 71208 A 15 C 0 0 Aero_Gooseneck_Light_-_250_Porcelain_White_Barn_Light_Electric_-_Modern_Office_Home_Lighting.jpg 14” Aero, 200-White, G12 Gooseneck Arm in 805-Charcoal Granite, Decorative Backing Plate Cover | Photos Courtesy of Homeowner 1500 1125 71208
58998 64928 product 0 71231 A 15 C 0 0 Avalon_LED_Gooseneck_Light_-_750_Porcelain_Cobalt_Blue_Barn_Light_Electric_-_Farmhouse_Exterior_Lighting.jpg Avalon LED, 750-Porcelain Cobalt Blue, G26 Gooseneck Arm, 850 Lumens, 2700K Color Temperature, Flat Lens | Photo Courtesy of Ames Ingham Interiors 1500 1000 71231
61716 64695 product 0 73949 A 15 C 0 0 Union_Gooseneck_Light_-_975_Galvanized_Barn_Light_Electric_-_Front_Door_Lighting.jpg 12” Union, 975-Galvanized, G1 Gooseneck Arm | Photo Courtesy of Traction Architecture and Ryan Gamma Photography 1500 1075 73949
56119 64695 product 0 68352 A 16 C 0 0 galvanized_gooseneck_lighting_outdoor-667x1000-512x768_ztmm-4d.jpg 16” Union Gooseneck Light, 975-Galvanized, G36 Gooseneck Arm | Photo Courtesy of Brevard Zoo 512 768 68352
58997 64928 product 0 71230 A 16 C 0 0 Ashland_LED_Gooseneck_Light_390_Teal.jpg 10" Avalon LED Gooseneck Light, 390-Teal, G11 Gooseneck Arm in 975-Galvanized | Photo Courtesy of Homeowner 1500 1763 71230
62179 64734 product 0 74412 A 16 C 0 0 baba-commercial-exterior-aero-gooseneck-705-navy-G8-alt.jpg 12" Aero, 705-Navy, G8 Gooseneck Arm, Decorative Backing Plate Cover 1500 2250 74412
65312 64734 product 0 77545 A 16 C 0 0 IMG_2193-residential-exterior-lighting-Aero-Gooseneck-12in-705-Navy-G17arm.jpg 12" Aero, 705-Navy, G17 Arm | Photo Courtesy of Homeowner 4032 3024 77545
66762 64734 product 0 78995 A 16 C 0 0 IQMRJH~7.jpg 16" Aero, 100-Black, G64 Arm, Heavy Cast Guard, Frosted Glass | Photo Courtesy of Quality Electric of Nepa 4032 3024 78995
66763 64734 product 0 78996 A 16 C 0 0 IMG_3823-residential-exterior-lighting-on-garage-Aero-Gooseneck-16in-100-Black-G64arm-Heavy-Duty-Cast-Guard-Frosted-Glass.jpeg 16" Aero, 100-Black, G64 Arm, Heavy Cast Guard, Frosted Glass | Photo Courtesy of Quality Electric of Nepa 4032 3024 78996
35829 64695 product 0 48062 A 17 C 0 0 union-gooseneck-insetting.jpg 16" Union, 400-Barn Red, G15 Gooseneck Arm, WC-Wire Cage, Decorative Backing Plate Cover | Customer Submission 900 600 48062
40469 64695 product 0 52702 A 18 C 0 0 universal_gooseneck_light_12in_805_charcoalgranite_g5arm.jpg 12” Union, 805-Charcoal Granite, G5 Gooseneck Arm | Customer Submission 1500 1125 52702
56110 64695 product 0 68343 A 19 C 0 0 union_gooseneck_light_10in_975_galvanized_G1straightarm-residential-exterior-door.jpg 10” Union, 975-Galvanized, G1 Straight Gooseneck Arm | Photo Courtesy of Homeowner 1500 2000 68343
46158 64695 product 0 58391 A 20 C 0 0 gooseneck_barn_lighting.jpeg 16” Union, 100-Black, G22 Gooseneck Arm | Photo Courtesy of the Homeowner 640 480 58391
60115 64695 product 0 72348 A 21 C 0 0 Union_Gooseneck_Light_-_805_Charcoal_Granite_Barn_Light_Electric_-_Exterior_Lighting.jpg 14” Union, 805-Charcoal Granite, G26 Gooseneck Arm | Photo Courtesy of Customer 1500 2000 72348
59284 64695 product 0 71517 A 22 C 0 0 Union_Gooseneck_Light_-_975_Galvanized_Barn_Light_Electric_-_Exterior_Lighting.jpg 12” Union, 975-Galvanized, G26 Gooseneck Arm | Photo Courtesy of Allison Spensley 1500 1082 71517
61859 64695 product 0 74092 A 23 C 0 0 Union_Gooseneck_Light_-_250_White_Barn_Light_Electric_-_Bathroom_Lighting.jpg 16” Union, 250-White, G15 Gooseneck Arm | Photo Courtesy of Homeowner 1500 2000 74092
66022 64695 product 0 78255 A 24 C 0 0 IMG_0012-residential-exterior-lighting-garage-Union-Gooseneck-16in-150-Black-G26arm-summer-spring.JPG 16" Union Gooseneck Light, 150-Black, G26 Arm | Customer Submission 1536 2048 78255
66023 64695 product 0 78256 A 25 C 0 0 IMG_0004-residential-exterior-lighting-night-dusk-garage-Union-Gooseneck-16in-150-Black-G26arm-on.JPG 16" Union Gooseneck Light, 150-Black, G26 Arm | Customer Submission 2049 1537 78256
66025 64695 product 0 78258 A 26 C 0 0 IMG_0027-EDIT2-residential-exterior-lighting-gate-driveway-stone-Union-Gooseneck-12in-150-Black-G4arm.jpg 12" Union Gooseneck, 150- Black, G4 Arm | Customer Submission 964 1267 78258