SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    9401, 
    2269, 
    2534, 
    2399, 
    2376, 
    1696, 
    2537, 
    2377, 
    2396, 
    2390, 
    2272, 
    2268, 
    2530, 
    2392, 
    2391, 
    2375, 
    356, 
    2395, 
    2394, 
    2398, 
    2393, 
    2532, 
    2531, 
    2400, 
    2271, 
    2401, 
    2266, 
    2273, 
    2535, 
    2538, 
    2536, 
    2402, 
    2267, 
    10667, 
    10669, 
    2270, 
    2533, 
    9624, 
    2403, 
    10249, 
    328, 
    2406, 
    9955, 
    395, 
    936, 
    2612, 
    933, 
    1514, 
    1407, 
    2434, 
    342, 
    9963, 
    2480, 
    2172, 
    2592, 
    2548, 
    9841, 
    1501, 
    2578, 
    1516, 
    345, 
    1480, 
    2405, 
    2479, 
    1415, 
    267, 
    2435, 
    1522, 
    1909, 
    1411, 
    1908, 
    9695, 
    2470, 
    2616, 
    1499, 
    716, 
    9845, 
    946, 
    2466, 
    991, 
    1519, 
    9944, 
    2374, 
    1441, 
    2179, 
    444, 
    2631, 
    9693, 
    953, 
    955, 
    1937, 
    2387, 
    1511, 
    1691, 
    1697, 
    2455, 
    2618, 
    9927, 
    9930, 
    2174, 
    994, 
    10250, 
    1698, 
    1523, 
    2617, 
    2175, 
    947, 
    1938, 
    398, 
    9846, 
    393, 
    934, 
    1692, 
    2483, 
    1442, 
    2481, 
    346, 
    1481, 
    2173, 
    9928, 
    1517, 
    1910, 
    9956, 
    2407, 
    1412, 
    2370, 
    992, 
    954, 
    956, 
    1408, 
    1502, 
    445, 
    2539, 
    1515, 
    2471, 
    1512, 
    1584, 
    1416, 
    9694, 
    2456, 
    932, 
    343, 
    2467, 
    1018, 
    2436, 
    9945, 
    2388, 
    944, 
    1500, 
    1315, 
    2604, 
    1513, 
    9847, 
    397, 
    1417, 
    10409, 
    1524, 
    1911, 
    347, 
    399, 
    2265, 
    2540, 
    2371, 
    396, 
    9946, 
    2621, 
    1496, 
    1939, 
    446, 
    941, 
    1306, 
    952, 
    2568, 
    2437, 
    1316, 
    9957, 
    344, 
    1693, 
    1503, 
    1438, 
    935, 
    2482, 
    2623, 
    1413, 
    2338, 
    1418, 
    1497, 
    394, 
    1861, 
    2372, 
    9848, 
    2472, 
    1694, 
    2587, 
    447, 
    2404, 
    929, 
    1912, 
    1695, 
    945, 
    10410, 
    1521, 
    1525, 
    9867, 
    1504, 
    348, 
    1414, 
    2581, 
    2389, 
    9855, 
    443, 
    10411, 
    1913, 
    1427, 
    8944, 
    2528, 
    2559, 
    2579, 
    9920, 
    349, 
    1419, 
    1409, 
    2542, 
    2566, 
    2580, 
    1420, 
    2176, 
    2554, 
    352, 
    1936, 
    9856, 
    1410, 
    10247, 
    2582, 
    1508, 
    9961, 
    1907, 
    990, 
    2478, 
    1505, 
    2180, 
    9294, 
    10413, 
    2567, 
    9857, 
    1520, 
    10248, 
    2583, 
    2541, 
    2584, 
    1509, 
    9858, 
    2597, 
    9849, 
    2549, 
    2599, 
    2585, 
    9864, 
    9859, 
    1510, 
    1479, 
    2602, 
    930, 
    1303, 
    2586, 
    1518, 
    1498, 
    9860, 
    1309, 
    2386, 
    1690, 
    1506, 
    2473, 
    9861, 
    2601, 
    2469, 
    341, 
    9929, 
    1714, 
    2553, 
    2596, 
    9862, 
    2454, 
    9863, 
    1715, 
    2613, 
    1914, 
    9958, 
    9865, 
    327, 
    9866, 
    715, 
    2397, 
    2171, 
    9918, 
    2468, 
    2529, 
    2178, 
    9919, 
    2373, 
    2552, 
    2433, 
    9290, 
    2465, 
    2577, 
    2591, 
    2611, 
    2615, 
    9692, 
    9830, 
    2603, 
    2595, 
    2593, 
    2610, 
    2634, 
    2594, 
    9840, 
    9264, 
    9844, 
    9842, 
    9843, 
    9926, 
    9936, 
    10425, 
    10631, 
    10426, 
    10632, 
    10633, 
    2638, 
    9623, 
    9921, 
    9922, 
    9923, 
    9924, 
    9940, 
    9941, 
    9942, 
    9943
  )

Query time 0.00373

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "678.25"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 1690,
      "rows_produced_per_join": 1690,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "340.25",
        "eval_cost": "338.00",
        "prefix_cost": "678.25",
        "data_read_per_join": "9M"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (9401,2269,2534,2399,2376,1696,2537,2377,2396,2390,2272,2268,2530,2392,2391,2375,356,2395,2394,2398,2393,2532,2531,2400,2271,2401,2266,2273,2535,2538,2536,2402,2267,10667,10669,2270,2533,9624,2403,10249,328,2406,9955,395,936,2612,933,1514,1407,2434,342,9963,2480,2172,2592,2548,9841,1501,2578,1516,345,1480,2405,2479,1415,267,2435,1522,1909,1411,1908,9695,2470,2616,1499,716,9845,946,2466,991,1519,9944,2374,1441,2179,444,2631,9693,953,955,1937,2387,1511,1691,1697,2455,2618,9927,9930,2174,994,10250,1698,1523,2617,2175,947,1938,398,9846,393,934,1692,2483,1442,2481,346,1481,2173,9928,1517,1910,9956,2407,1412,2370,992,954,956,1408,1502,445,2539,1515,2471,1512,1584,1416,9694,2456,932,343,2467,1018,2436,9945,2388,944,1500,1315,2604,1513,9847,397,1417,10409,1524,1911,347,399,2265,2540,2371,396,9946,2621,1496,1939,446,941,1306,952,2568,2437,1316,9957,344,1693,1503,1438,935,2482,2623,1413,2338,1418,1497,394,1861,2372,9848,2472,1694,2587,447,2404,929,1912,1695,945,10410,1521,1525,9867,1504,348,1414,2581,2389,9855,443,10411,1913,1427,8944,2528,2559,2579,9920,349,1419,1409,2542,2566,2580,1420,2176,2554,352,1936,9856,1410,10247,2582,1508,9961,1907,990,2478,1505,2180,9294,10413,2567,9857,1520,10248,2583,2541,2584,1509,9858,2597,9849,2549,2599,2585,9864,9859,1510,1479,2602,930,1303,2586,1518,1498,9860,1309,2386,1690,1506,2473,9861,2601,2469,341,9929,1714,2553,2596,9862,2454,9863,1715,2613,1914,9958,9865,327,9866,715,2397,2171,9918,2468,2529,2178,9919,2373,2552,2433,9290,2465,2577,2591,2611,2615,9692,9830,2603,2595,2593,2610,2634,2594,9840,9264,9844,9842,9843,9926,9936,10425,10631,10426,10632,10633,2638,9623,9921,9922,9923,9924,9940,9941,9942,9943))"
    }
  }
}

Result

category_id parent_id
328 327
1018 327
1438 327
1695 327
2528 327
2566 327
2567 327
2597 327
342 341
343 341
397 341
345 344
346 344
348 344
349 344
352 344
2595 344
9264 344
347 346
2470 346
2471 346
2472 346
2638 346
393 356
396 356
929 356
1506 356
1714 356
1715 356
1914 356
2397 356
2468 356
2529 356
2552 356
9290 356
1516 393
1517 393
395 394
398 394
399 394
1861 394
2389 394
2554 394
9294 394
9623 394
9921 394
9922 394
9923 394
9924 394
9940 394
9941 394
9942 394
9943 394
267 443
444 443
445 443
446 443
447 443
1409 443
1410 443
1505 443
1509 443
1510 443
1518 443
1690 443
2454 443
2610 443
2634 443
9842 443
9843 443
10425 443
10426 443
2631 444
1407 445
1408 445
1441 447
1442 447
10409 447
10410 447
10411 447
10413 447
716 715
1315 715
1415 929
1416 929
1417 929
1418 929
1419 929
1420 929
2541 929
932 930
935 930
945 930
8944 930
9961 930
933 932
934 932
941 932
953 933
954 933
955 934
956 934
936 935
944 935
952 935
946 945
947 945
1316 945
991 990
992 990
994 990
2265 990
2603 991
9401 1309
1514 1409
1515 1409
1411 1410
1412 1410
1413 1410
1414 1410
1427 1410
1508 1410
1520 1410
1480 1479
1481 1479
1496 1479
1497 1479
1522 1497
1523 1497
1524 1497
1525 1497
1479 1498
1499 1498
1500 1498
2386 1498
2469 1498
2553 1498
1501 1500
1502 1500
1503 1500
1504 1500
1511 1510
1512 1510
1513 1510
1521 1510
2542 1510
1519 1518
1303 1584
1309 1584
2473 1584
2596 1584
2613 1584
9958 1584
1691 1690
1692 1690
1693 1690
1694 1690
1696 1695
1697 1695
1698 1695
2568 1695
2599 1695
2602 1695
1908 1907
1909 1907
1910 1907
1911 1907
1912 1907
1913 1907
2180 1907
9849 1907
9864 1907
1937 1936
1938 1936
1939 1936
2579 1936
2580 1936
2583 1936
2584 1936
2585 1936
2586 1936
2601 1936
9929 1936
2172 2171
2173 2171
2174 2173
2175 2173
2621 2173
2179 2178
2370 2178
2371 2178
2372 2178
2559 2178
9748 2178
9749 2178
9750 2178
2266 2265
2267 2265
2268 2265
2269 2265
2270 2265
2271 2265
2272 2265
2273 2265
2374 2373
2388 2373
2375 2374
2376 2374
2377 2374
2548 2374
2387 2386
2390 2388
2391 2388
2392 2388
2393 2388
2394 2388
2395 2388
2396 2388
2479 2388
2483 2388
9624 2393
2398 2397
2399 2397
2400 2397
2401 2397
2402 2397
2403 2397
2405 2404
2539 2404
2540 2404
2406 2405
2407 2405
2176 2433
2434 2433
2478 2433
2549 2433
2435 2434
2436 2434
2437 2434
2455 2454
2456 2454
2466 2465
2467 2465
2480 2478
2481 2478
2482 2478
2587 2478
2530 2529
2531 2529
2532 2529
2533 2529
2534 2529
2535 2529
2536 2529
2537 2529
2538 2529
2578 2577
2604 2577
2623 2577
9867 2577
9920 2577
10247 2577
10248 2577
2338 2580
2581 2580
2582 2580
2592 2591
2593 2591
2594 2591
9955 2604
9956 2604
9957 2604
1306 2611
2612 2611
2616 2615
2617 2615
2618 2616
9693 9692
9694 9692
9695 9694
9841 9840
9845 9844
9846 9844
9847 9844
9848 9844
9855 9844
9856 9844
9857 9844
9858 9844
9859 9844
9860 9844
9861 9844
9862 9844
9863 9844
9865 9844
9866 9844
9918 9844
9919 9844
9927 9926
9928 9926
9930 9927
9963 9928
9944 9941
9945 9941
9946 9941
10249 10248
10250 10248
10669 10667