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 (
    12349, 12354, 12359, 12350, 12351, 12352, 
    12353, 12364, 12369, 12374, 12365, 
    12366, 12367, 12368, 12259, 12304, 
    12260, 12261, 12274, 12289, 12262, 
    12265, 12268, 12271, 12504, 12514, 
    12509, 12505, 12506, 12507, 12508, 
    12524, 12532, 12528, 12525, 12526, 
    12527, 12379, 12394, 12409, 12384, 
    12389, 12380, 12381, 12382, 12383
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00197

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "119.01"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "50.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": 50,
            "rows_produced_per_join": 50,
            "filtered": "100.00",
            "index_condition": "((`test2_gaseus`.`cscart_images_links`.`object_type` = 'product') and (`test2_gaseus`.`cscart_images_links`.`type` = 'M') and (`test2_gaseus`.`cscart_images_links`.`object_id` in (12349,12354,12359,12350,12351,12352,12353,12364,12369,12374,12365,12366,12367,12368,12259,12304,12260,12261,12274,12289,12262,12265,12268,12271,12504,12514,12509,12505,12506,12507,12508,12524,12532,12528,12525,12526,12527,12379,12394,12409,12384,12389,12380,12381,12382,12383)))",
            "cost_info": {
              "read_cost": "29.01",
              "eval_cost": "5.00",
              "prefix_cost": "34.01",
              "data_read_per_join": "4K"
            },
            "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": [
              "test2_gaseus.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 50,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "12.50",
              "eval_cost": "5.00",
              "prefix_cost": "51.51",
              "data_read_per_join": "38K"
            },
            "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": [
              "test2_gaseus.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 50,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "12.50",
              "eval_cost": "5.00",
              "prefix_cost": "69.01",
              "data_read_per_join": "29K"
            },
            "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 1548237937-17812-1-2_600x600_2x.jpg 500 448 N 11731 12259 product 15214 M 0 15214
0 1548237937-17812-1-2_600x600_2x_r8td-wq.jpg 500 448 N 11732 12260 product 15215 M 0 15215
0 1548237937-17812-1-2_600x600_2x_ayjq-8g.jpg 500 448 N 11733 12261 product 15216 M 0 15216
0 1548237937-17812-1-2_600x600_2x_lcpj-he.jpg 500 448 N 11734 12262 product 15217 M 0 15217
0 1548237937-17812-1-2_600x600_2x_a8mo-hx.jpg 500 448 N 11737 12265 product 15220 M 0 15220
0 1548237937-17812-1-2_600x600_2x_yj0t-g9.jpg 500 448 N 11740 12268 product 15223 M 0 15223
0 1548237937-17812-1-2_600x600_2x_x8yr-dl.jpg 500 448 N 11743 12271 product 15226 M 0 15226
0 1548237937-17812-1-2_600x600_2x_hpkg-b9.jpg 500 448 N 11746 12274 product 15229 M 0 15229
0 1548237937-17812-1-2_600x600_2x_h4tk-cl.jpg 500 448 N 11761 12289 product 15244 M 0 15244
0 1371625705-27843-1_600x600.jpg 500 416 N 11776 12304 product 15259 M 0 15259
0 1378276732-30361_600x600.jpg 500 342 N 11821 12349 product 15304 M 0 15304
0 1378276732-30361_600x600_xrtk-pz.jpg 500 342 N 11822 12350 product 15305 M 0 15305
0 1378276732-30361_600x600_r8lp-ky.jpg 500 342 N 11823 12351 product 15306 M 0 15306
0 1378276732-30361_600x600_rgxx-g3.jpg 500 342 N 11824 12352 product 15307 M 0 15307
0 1378276732-30361_600x600_3ssw-lq.jpg 500 342 N 11825 12353 product 15308 M 0 15308
0 1378276732-30361_600x600_nygw-jj.jpg 500 342 N 11826 12354 product 15309 M 0 15309
0 1378276732-30361_600x600_4ckd-cy.jpg 500 342 N 11831 12359 product 15314 M 0 15314
0 1380707184-31237-1_600x600.jpg 500 366 N 11836 12364 product 15319 M 0 15319
0 1380707184-31237-1_600x600_2ogz-iq.jpg 500 366 N 11837 12365 product 15320 M 0 15320
0 1380707184-31237-1_600x600_vd4v-fd.jpg 500 366 N 11838 12366 product 15321 M 0 15321
0 1380707184-31237-1_600x600_004d-8v.jpg 500 366 N 11839 12367 product 15322 M 0 15322
0 1380707184-31237-1_600x600_6mzt-bw.jpg 500 366 N 11840 12368 product 15323 M 0 15323
0 1380707184-31237-1_600x600_1w9p-hd.jpg 500 366 N 11841 12369 product 15324 M 0 15324
0 1380707184-31237-1_600x600_ttfx-ub.jpg 500 366 N 11846 12374 product 15329 M 0 15329
0 Screenshot_2026-03-24_at_14.27.02.png 358 310 N 11851 12379 product 15334 M 0 15334
0 Screenshot_2026-03-24_at_14.27.02_3ujl-v5.png 358 310 N 11852 12380 product 15335 M 0 15335
0 Screenshot_2026-03-24_at_14.27.02_fsxj-wu.png 358 310 N 11853 12381 product 15336 M 0 15336
0 Screenshot_2026-03-24_at_14.27.02_wmdu-2y.png 358 310 N 11854 12382 product 15337 M 0 15337
0 Screenshot_2026-03-24_at_14.27.02_mx77-zu.png 358 310 N 11855 12383 product 15338 M 0 15338
0 Screenshot_2026-03-24_at_14.27.02_uww6-9s.png 358 310 N 11856 12384 product 15339 M 0 15339
0 Screenshot_2026-03-24_at_14.27.02_2jru-jf.png 358 310 N 11861 12389 product 15344 M 0 15344
0 Screenshot_2026-03-24_at_14.27.02_9rp8-t9.png 358 310 N 11866 12394 product 15349 M 0 15349
0 Screenshot_2026-03-24_at_14.27.02_t3op-zn.png 358 310 N 11881 12409 product 15364 M 0 15364
0 Thanos_F1_600x600.jpg 600 600 N 11976 12504 product 15459 M 0 15459
0 Thanos_F1_600x600_7j50-v3.jpg 600 600 N 11977 12505 product 15460 M 0 15460
0 Thanos_F1_600x600_q7kk-9u.jpg 600 600 N 11978 12506 product 15461 M 0 15461
0 Thanos_F1_600x600_f9sw-gb.jpg 600 600 N 11979 12507 product 15462 M 0 15462
0 Thanos_F1_600x600_5nos-3s.jpg 600 600 N 11980 12508 product 15463 M 0 15463
0 Thanos_F1_600x600_mtp6-s0.jpg 600 600 N 11981 12509 product 15464 M 0 15464
0 Thanos_F1_600x600_ymqm-6z.jpg 600 600 N 11986 12514 product 15469 M 0 15469
0 Thanos_L2_600x600.jpg 564 600 N 11996 12524 product 15479 M 0 15479
0 Thanos_L2_600x600_neqv-1j.jpg 564 600 N 11997 12525 product 15480 M 0 15480
0 Thanos_L2_600x600_igcv-0e.jpg 564 600 N 11998 12526 product 15481 M 0 15481
0 Thanos_L2_600x600_909f-69.jpg 564 600 N 11999 12527 product 15482 M 0 15482
0 Thanos_L2_600x600_a3z8-47.jpg 564 600 N 12000 12528 product 15483 M 0 15483
0 Thanos_L2_600x600_3k93-ng.jpg 564 600 N 12004 12532 product 15487 M 0 15487