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 (
    12379, 12394, 12409, 12384, 12389, 12380, 
    12381, 12382, 12383, 519, 529, 539, 
    941, 951, 1002, 1013, 1024, 1035, 1045, 
    1129, 2724, 3303, 6861, 7010, 7247, 
    2495, 962, 1077, 524, 549, 520, 521, 
    522, 523, 4272, 4273, 4274, 4275, 4276, 
    7008, 3186, 3166, 3167, 3171, 3174, 
    3180, 3187, 3193, 3195, 3271, 3282, 
    6757, 6842, 7071, 7110, 7032, 7182
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00450

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "141.11"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "59.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": 59,
            "rows_produced_per_join": 59,
            "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 (12379,12394,12409,12384,12389,12380,12381,12382,12383,519,529,539,941,951,1002,1013,1024,1035,1045,1129,2724,3303,6861,7010,7247,2495,962,1077,524,549,520,521,522,523,4272,4273,4274,4275,4276,7008,3186,3166,3167,3171,3174,3180,3187,3193,3195,3271,3282,6757,6842,7071,7110,7032,7182)))",
            "cost_info": {
              "read_cost": "34.91",
              "eval_cost": "5.90",
              "prefix_cost": "40.81",
              "data_read_per_join": "5K"
            },
            "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": 59,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "14.75",
              "eval_cost": "5.90",
              "prefix_cost": "61.46",
              "data_read_per_join": "45K"
            },
            "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": 59,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "14.75",
              "eval_cost": "5.90",
              "prefix_cost": "82.11",
              "data_read_per_join": "35K"
            },
            "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 Seite-74-F10-2-300-Effect-LabLinekEtsMRyV4cFWo_600x600_2x.jpg 1200 800 N 6229 6757 product 9712 M 0 9712
0 Seite-72-F10-300-Effect-LabLine2aFmf03h0ksC8_600x600_2x.jpg 1200 800 N 6314 6842 product 9797 M 0 9797
0 1354553002-17499_600x600_2x.jpg 500 474 N 6333 6861 product 9816 M 0 9816
0 1447432387-1306-1_600x600_2x_t1v7-bp.jpg 500 495 N 6480 7008 product 9963 M 0 9963
0 1447432387-1306-1_600x600_2x_3fno-mc.jpg 500 495 N 6482 7010 product 9965 M 0 9965
0 1331284133-27898_600x600_2x_tyop-gr.jpg 331 380 N 6504 7032 product 9987 M 0 9987
0 1383039868-22268_600x600_2x_ml6t-57.jpg 470 500 N 6543 7071 product 10026 M 0 10026
0 306-770-LHR-300-200-Seite-35iC667EhBYIRFc_600x600_2x_iq7c-89.jpg 1200 800 N 6582 7110 product 10065 M 0 10065
0 1387465690-3359-1_600x600_2x.jpg 500 467 N 6654 7182 product 10137 M 0 10137
0 306-770-LHR-300-200-Seite-35QAn3UK2M6eDWe_600x600_2x_5rav-4n.jpg 1200 800 N 6719 7247 product 10202 M 0 10202
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 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_u8fa-08.jpg 1178 1200 N 13220 519 product 16700 M 0 16700
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_ks8e-vn.jpg 1178 1200 N 13221 520 product 16701 M 0 16701
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_dwd2-qp.jpg 1178 1200 N 13222 521 product 16702 M 0 16702
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_s9ya-qc.jpg 1178 1200 N 13223 522 product 16703 M 0 16703
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_k2lp-zt.jpg 1178 1200 N 13224 523 product 16704 M 0 16704
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_mq38-u8.jpg 1178 1200 N 13225 524 product 16705 M 0 16705
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_m3ko-vw.jpg 1178 1200 N 13230 529 product 16710 M 0 16710
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_9l1b-z3.jpg 1178 1200 N 13240 539 product 16720 M 0 16720
0 226711-F10-300F-Effect-Flowmeter-Seite-49bQ5TQptiffk6b_600x600_2x_x3o0-12.jpg 1178 1200 N 13250 549 product 16730 M 0 16730
0 Druckminderer-Vulkan-F-10-300-Effect-Pr_fgas-2_600x600_2x_w8ub-vs.jpg 500 446 N 13642 941 product 17123 M 0 17123
0 Druckminderer-Vulkan-F-10-300-Effect-Druckluft-2_600x600_2x_ouc3-i1.jpg 500 446 N 13652 951 product 17133 M 0 17133
0 1336118288-28448_600x600_2x_02ha-o4.jpg 580 517 N 13663 962 product 17144 M 0 17144
0 Druckminderer-Vulkan-F-10-300-Effect-Stickstoff-2_600x600_2x_v337-or.jpg 500 446 N 13703 1002 product 17184 M 0 17184
0 Druckminderer-Vulkan-F-10-300-Effect-Helium-2_600x600_2x_ax4q-mr.jpg 500 446 N 13714 1013 product 17195 M 0 17195
0 Druckminderer-Vulkan-F-10-300-Effect-Sauerstoff-2_600x600_2x_190u-v8.jpg 500 446 N 13725 1024 product 17206 M 0 17206
0 Druckminderer-Vulkan-F-10-200-Effect-Methan-2_600x600_2x_4mok-mh.jpg 500 474 N 13736 1035 product 17217 M 0 17217
0 Druckminderer-Vulkan-F-10-200-Effect-Lachgas-2_600x600_2x_t4al-u3.jpg 500 474 N 13746 1045 product 17227 M 0 17227
0 1334916838-28564_600x600_2x_2t7u-kj.jpg 580 517 N 13778 1077 product 17259 M 0 17259
0 Druckminderer-Vulkan-F-10-200-Effect-Wasserstoff-3_600x600_2x_s367-6j.jpg 500 474 N 13830 1129 product 17311 M 0 17311
0 Druckminderer-Vulkan-F-10-300-Effect-Formiergas-zweistufig-2_600x600_2x_iw50-wm.jpg 500 364 N 15196 2495 product 18677 M 0 18677
0 209000-F10-Ace-3_600x600_2x_6wng-5t.jpg 500 330 N 15425 2724 product 18906 M 0 18906
0 276711-F10-300F-Effect-Flowmeter-LabLine-Seite-73jnqvyUrfzX4ND_600x600_2x_60kb-0j.jpg 1191 1200 N 15867 3166 product 19348 M 0 19348
0 276711-F10-300F-Effect-Flowmeter-LabLine-Seite-73jnqvyUrfzX4ND_600x600_2x_g1g1-tp.jpg 1191 1200 N 15868 3167 product 19349 M 0 19349
0 Seite-74-F10-2-300-Effect-LabLineJBuIVNZ4mAIwT_600x600_2x.jpg 1200 800 N 15872 3171 product 19353 M 0 19353
0 Seite-72-F10-300-Effect-LabLinemIF5wRhMrIvuu_600x600_2x.jpg 1200 800 N 15875 3174 product 19356 M 0 19356
0 Seite-74-F10-2-300-Effect-LabLinevbOlhlmNHaxo4_600x600_2x.jpg 1200 800 N 15881 3180 product 19362 M 0 19362
0 Seite-72-F10-300-Effect-LabLine-LGdXHUORL9Aecim_600x600_2x.jpg 1200 800 N 15887 3186 product 19368 M 0 19368
0 Druckregler-Vulkan-F10-F-300-Effect-LabLine-2_6-26-Wasserstoff_600x600_2x.jpg 707 800 N 15888 3187 product 19369 M 0 19369
0 Seite-74-F10-2-300-Effect-LabLineerzJouJLdbYAN_600x600_2x.jpg 1200 800 N 15894 3193 product 19375 M 0 19375
0 Druckminderer-Vulkan-F10-F-300-Effect-LabLine-4-42-Stickstoff-2_600x600_2x.jpg 442 500 N 15896 3195 product 19377 M 0 19377
0 Seite-72-F10-300-Effect-LabLineOMFYxN4xq48Mn_600x600_2x.jpg 1200 800 N 15972 3271 product 19453 M 0 19453
0 Seite-72-F10-300-Effect-LabLineramNqEU7iAhoC_600x600_2x.jpg 1200 800 N 15983 3282 product 19464 M 0 19464
0 1412750063-5992_600x600_2x.jpg 500 494 N 16004 3303 product 19485 M 0 19485
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_c70p-iv.jpg 1178 1200 N 16973 4272 product 20454 M 0 20454
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_wmab-dv.jpg 1178 1200 N 16974 4273 product 20455 M 0 20455
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_jbl3-md.jpg 1178 1200 N 16975 4274 product 20456 M 0 20456
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_743n-ah.jpg 1178 1200 N 16976 4275 product 20457 M 0 20457
0 226711-F10-300F-Effect-Flowmeter-Seite-49ihw6ccUhGKjGw_600x600_2x_r1co-fr.jpg 1178 1200 N 16977 4276 product 20458 M 0 20458