SELECT 
  cscart_images.*, 
  cscart_images_links.*, 
  cscart_common_descriptions.description AS alt, 
  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 = 'M' 
  AND cscart_images_links.object_id IN (
    2052, 2021, 2022, 2017, 2018, 2053, 2054, 
    2015, 2016, 1274, 1275, 1276, 1271, 
    1272, 1273, 1267, 1268, 1269, 1270, 
    1264, 1265, 1266, 1261, 1262, 1263, 
    1258, 1259, 1260, 1229, 1230, 1235, 
    1238, 1233, 1234, 1226, 1227, 1228, 
    1150, 1159, 1156, 1151, 1154, 1155, 
    1145, 1146, 1147, 1148
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00235

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "218.16"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "96.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_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": 96,
            "rows_produced_per_join": 96,
            "filtered": "100.00",
            "index_condition": "((`wearethehelpful_scalesta_net`.`cscart_images_links`.`object_type` = 'product') and (`wearethehelpful_scalesta_net`.`cscart_images_links`.`type` = 'M') and (`wearethehelpful_scalesta_net`.`cscart_images_links`.`object_id` in (2052,2021,2022,2017,2018,2053,2054,2015,2016,1274,1275,1276,1271,1272,1273,1267,1268,1269,1270,1264,1265,1266,1261,1262,1263,1258,1259,1260,1229,1230,1235,1238,1233,1234,1226,1227,1228,1150,1159,1156,1151,1154,1155,1145,1146,1147,1148)))",
            "cost_info": {
              "read_cost": "45.36",
              "eval_cost": "9.60",
              "prefix_cost": "54.96",
              "data_read_per_join": "9K"
            },
            "used_columns": [
              "pair_id",
              "object_id",
              "object_type",
              "image_id",
              "detailed_id",
              "type",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "image_id"
            ],
            "key_length": "4",
            "ref": [
              "wearethehelpful_scalesta_net.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 96,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "24.00",
              "eval_cost": "9.60",
              "prefix_cost": "88.56",
              "data_read_per_join": "73K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_common_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "lang_code",
              "object_holder"
            ],
            "key_length": "108",
            "ref": [
              "wearethehelpful_scalesta_net.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 96,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "24.00",
              "eval_cost": "9.60",
              "prefix_cost": "122.16",
              "data_read_per_join": "57K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ]
          }
        }
      ]
    }
  }
}

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 60gfullsetDSC_7285.jpg 3834 3834 N 10133 1145 product 11847 M 0 11847
0 60gfullsetDSC_7285.jpg 3834 3834 N 10142 1146 product 11847 M 0 11847
0 60gfullsetDSC_7285.jpg 3834 3834 N 10143 1147 product 11847 M 0 11847
0 60gfullsetDSC_7285.jpg 3834 3834 N 10144 1148 product 11847 M 0 11847
0 Decaf60gDSC_7273.jpg 4024 4024 N 10147 1150 product 11852 M 0 11852
0 Decaf60gDSC_7273.jpg 4024 4024 N 10268 1151 product 11852 M 0 11852
0 Decaf60gDSC_7273.jpg 4024 4024 N 10271 1154 product 11852 M 0 11852
0 Decaf60gDSC_7273.jpg 4024 4024 N 10272 1155 product 11852 M 0 11852
0 Decaf60gDSC_7273.jpg 4024 4024 N 10273 1156 product 11852 M 0 11852
0 Decaf60gDSC_7273.jpg 4024 4024 N 10276 1159 product 11852 M 0 11852
0 Choc60gDSC_7278.jpg 4024 4024 N 10407 1226 product 11865 M 0 11865
0 Choc60gDSC_7278.jpg 4024 4024 N 10420 1227 product 11865 M 0 11865
0 Choc60gDSC_7278.jpg 4024 4024 N 10421 1228 product 11865 M 0 11865
0 Nobody60gDSC_7276.jpg 4024 4024 N 10422 1229 product 11870 M 0 11870
0 Nobody60gDSC_7276.jpg 4024 4024 N 10555 1230 product 11870 M 0 11870
0 Nobody60gDSC_7276.jpg 4024 4024 N 10558 1233 product 11870 M 0 11870
0 Nobody60gDSC_7276.jpg 4024 4024 N 10559 1234 product 11870 M 0 11870
0 Nobody60gDSC_7276.jpg 4024 4024 N 10560 1235 product 11870 M 0 11870
0 Nobody60gDSC_7276.jpg 4024 4024 N 10563 1238 product 11870 M 0 11870
0 WomensGetInLineHushDressingGown28_Get_In_Line_Lilac_PJ_F_013copy2.jpg 3000 4000 N 10741 1259 product 12020 M 0 12020
0 WomensGetInLineHushDressingGown28_Get_In_Line_Lilac_PJ_F_013copy2.jpg 3000 4000 N 10742 1260 product 12020 M 0 12020
0 WomensGetInLinePJs_WomensGetInLinePJs_28_Get_In_Line_Lilac_PJ_F_001copy2_53cda9f8-848e-44c1-9f5d-963ac3ae32da.jpg 3000 4000 N 10760 1263 product 12027 M 0 12027
0 HopeNightieSilverLinings_Copyof16_Off_The_Shoulder_Gown_F_003copy2.jpg 3000 4000 N 10780 1265 product 12033 M 0 12033
0 HopeNightieSilverLinings_Copyof16_Off_The_Shoulder_Gown_F_003copy2.jpg 3000 4000 N 10781 1266 product 12033 M 0 12033
0 HushDressingGownSilverLiningsFemale_Copyof02_CLOUD_DRESSING_F_016copy2.jpg 3005 4000 N 10807 1268 product 12040 M 0 12040
0 HushDressingGownSilverLiningsFemale_Copyof02_CLOUD_DRESSING_F_016copy2.jpg 3005 4000 N 10808 1269 product 12040 M 0 12040
0 HushDressingGownSilverLiningsFemale_Copyof02_CLOUD_DRESSING_F_016copy2.jpg 3005 4000 N 10809 1270 product 12040 M 0 12040
0 WomensLemondlandHushDressingGown_WomensLemondlandHushDressingGown27_Lemonland_PJ_F_003copy2.jpg 3000 4000 N 10817 1272 product 12047 M 0 12047
0 WomensLemondlandHushDressingGown_WomensLemondlandHushDressingGown27_Lemonland_PJ_F_003copy2.jpg 3000 4000 N 10818 1273 product 12047 M 0 12047
0 WomensLemonlandPJs_WomensLemonlandPJs27_Lemonland_PJ_F_010copy2.jpg 3000 4000 N 10830 1276 product 12050 M 0 12050
0 Screenshot_from_2026-02-16_12-25-30.png 416 382 N 45100 2015 product 13941 M 0 13941
0 Screenshot_from_2026-02-16_12-25-30.png 416 382 N 45107 2016 product 13941 M 0 13941
0 Screenshot_from_2026-02-16_12-25-53_yvn3-cf.png 420 419 N 45108 2017 product 13945 M 0 13945
0 Screenshot_from_2026-02-16_12-25-53_yvn3-cf.png 420 419 N 45111 2018 product 13945 M 0 13945
0 Screenshot_from_2026-02-16_12-25-30_zpk3-7k.png 416 382 N 45112 2021 product 13947 M 0 13947
0 Screenshot_from_2026-02-16_12-25-30_zpk3-7k.png 416 382 N 45115 2022 product 13947 M 0 13947
0 Screenshot_from_2026-02-16_12-25-30_zpk3-7k.png 416 382 N 45375 2052 product 13947 M 0 13947
0 Screenshot_from_2026-02-16_12-25-30.png 416 382 N 45382 2053 product 13941 M 0 13941
0 Screenshot_from_2026-02-16_12-25-30.png 416 382 N 45383 2054 product 13941 M 0 13941
0 tonic-london-womens-hope-nightie-silver-linings.jpg 1000 1000 N 36454 1264 product 13407 M 4 13407
0 tonic-london-lemonland-pyjamas-recovery-comfortwear-02_z5ul-4h.jpg 1000 1000 N 36468 1275 product 13421 M 4 13421
0 tonic-london-get-in-line-dressing-gown_kh5a-9s.jpg 1000 1000 N 36462 1258 product 13415 M 7 13415
0 tonic-london-get-in-line-dressing-gown-01.jpg 1000 1000 N 36450 1267 product 13403 M 66218749165903 13403
0 tonic-london-lemonland-hush-dressing-gown.jpg 1000 1000 N 36448 1271 product 13401 M 66260927938895 13401
0 tonic-london-get-in-line-pyjamas.jpg 1000 1000 N 36457 1261 product 13410 M 66260998259023 13410
0 tonic-london-get-in-line-pyjamas_nkt4-3b.jpg 1000 1000 N 36471 1262 product 13424 M 66260998259023 13424
0 tonic-london-lemonland-pyjamas-recovery-comfortwear-02.jpg 1000 1000 N 36444 1274 product 13397 M 66261012906319 13397