Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Setting batch size in EclipseLink 1.1.4
Setting batch size in EclipseLink 1.1.4 [message #854206] Mon, 23 April 2012 19:21 Go to next message
Matti Hansson is currently offline Matti HanssonFriend
Messages: 68
Registered: July 2009
Member
Hi!
I'm working on a project where a number of objects are fetched by creating a query like so:
public List<Regenh> getById(String[] idArray) {
    ReadAllQuery query = new ReadAllQuery(Regenh.class);
    ExpressionBuilder builder = query.getExpressionBuilder();

    Expression expression = builder.get("id").in(idArray);
    query.setSelectionCriteria(expression);

    return (List<Regenh>) entityManager.getActiveSession().executeQuery(query);
  }

The user is allowed to enter 1000 ids in the array, but the default number of parameters that EclipseLink allows in a query using "in" is 256. In EclipseLink 2.1 there's a method called setBatchFetchSize() to tweak this value, but I'm stuck using 1.1.4.

At least I assume that's why I only get 256 objects in my reply, though the full 1000 ids are logged...
21:11:08,728 INFO  [STDOUT] 2012-04-23 21:11:08,728 DEBUG [EL Fine]: Connection(1284726)--SELECT ID, OTYP, STATUS, UUID, AJOURFR, AJOURIR, AVIR, SERVUT FROM SETFR.T01ABC_REGENH WHERE ((ID IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,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, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)) AND (OTYP <> ?))
	bind => [010000010, 010000026, 010000031, 010000032, 010000037, 010000039, 010000041, 010000065, 010000083, 010000085, 010000101, 010000111, 010000114, 010205776, 010000127, 010000130, 010000141, 010000144, 010000149, 010000159, 010000161, 010000168, 010000175, 010000187, 010000189, 010000197, 010000212, 010000216, 010000230, 010000245, 010000261, 010000265, 010000278, 010000300, 010000303, 010000305, 010000319, 010000328, 010000333, 010000346, 010000355, 010000364, 010000365, 010000368, 010000371, 010000405, 010000411, 010000416, 010000419, 010000421, 010000424, 010000427, 010000437, 010000438, 010000443, 010000469, 010000472, 010000473, 010000474, 010000507, 010000511, 010000516, 010000525, 010000532, 010000533, 010000557, 010000577, 010000581, 010000599, 010000608, 010000617, 010000621, 010000624, 010000631, 010000640, 010000646, 010000651, 010000661, 010000669, 010000670, 010000679, 010000680, 010000681, 010000686, 010000688, 010000715, 010000716, 010000717, 010249195, 010000744, 010000747, 010000759, 010000762, 010000763, 010000780, 010000782, 010000789, 010000791, 010000795, 010000798, 010000799, 010000802, 010000803, 010000817, 010000828, 010000830, 010000833, 010000848, 010000849, 010000859, 010000874, 010000878, 010000881, 010000891, 010000893, 010000921, 010000925, 010000941, 010000947, 010000958, 010000975, 010000992, 010000993, 010001001, 010000006, 010000011, 010000012, 010000023, 010000028, 010000035, 010000038, 010000040, 010000050, 010000051, 010000053, 010000077, 010000091, 010000095, 010000097, 010000098, 010000106, 010000115, 010000126, 010000132, 010000135, 010000136, 010000139, 010000140, 010000154, 010000169, 010000195, 010000204, 010000219, 010000222, 010000225, 010000239, 010000240, 010000252, 010000302, 010342522, 010000332, 010000334, 010000340, 010000342, 010000349, 010000362, 010000367, 010000369, 010000375, 010000377, 010000378, 010000394, 010000399, 010000413, 010000418, 010000430, 010000440, 010000442, 010000455, 010000466, 010000475, 010000477, 010000484, 010000485, 010000488, 010000491, 010000494, 010000495, 010000500, 010000517, 010000522, 010000534, 010000543, 010000550, 010000558, 010000564, 010000568, 010000576, 010000580, 010000602, 010000605, 010000607, 010000620, 010000642, 010000663, 010000664, 010000668, 010000674, 010000683, 010000690, 010000692, 010000702, 010000727, 010000730, 010000736, 010000738, 010000742, 010000743, 010000756, 010000761, 010000764, 010000770, 010000774, 010000783, 010000785, 010000787, 010000788, 010000801, 010000813, 010000821, 010000831, 010000835, 010000839, 010000842, 010000853, 010000860, 010000867, 010000884, 010000898, 010000910, 010000917, 010000924, 010378830, 010426065, 010000946, 010000949, 010000966, 010000976, 010000978, 010000988, 010000991, 010000994, 010000998, 010000016, 010000019, 010000030, 010000042, 010000048, 010000049, 010000062, 010000068, 010000078, 010000081, 010000090, 010000108, 010000112, 010000116, 010000131, 010000134, 010000153, 010000160, 010000162, 010000164, 010000172, 010000185, 010000193, 010000205, 010000206, 010000211, 010000224, 010000232, 010000260, 010000269, 010000276, 010000282, 010000299, 010000304, 010000326, 010000327, 010000341, 010000347, 010000356, 010000360, 010000361, 010000380, 010000381, 010000384, 010000403, 010000428, 010000436, 010000441, 010000446, 010000448, 010000452, 010000459, 010000460, 010000462, 010000463, 010000489, 010000503, 010000506, 010000513, 010000518, 010000523, 010000526, 010000530, 010000537, 010000544, 010000548, 010000562, 010000571, 010000572, 010000583, 010000586, 010000595, 010000606, 010000614, 010000615, 010000622, 010000623, 010000625, 010000629, 010000639, 010000654, 010000689, 010000693, 010000695, 010000705, 010000726, 010000754, 010000755, 010000768, 010000776, 010000777, 010000778, 010000786, 010000796, 010000804, 010000806, 010000807, 010000819, 010000832, 010000834, 010000836, 010000843, 010000846, 010000847, 010000854, 010000857, 010000875, 010000879, 010000880, 010000887, 010000904, 010000912, 010000919, 010000930, 010415647, 010000940, 010000944, 010000964, 010000968, 010000971, 010000989, 010000020, 010000021, 010000022, 010000029, 010000034, 010000043, 010000054, 010000060, 010000063, 010000064, 010000070, 010000076, 010000080, 010000082, 010000086, 010000105, 010000107, 010000109, 010000113, 010000117, 010000129, 010000137, 010000146, 010000150, 010000155, 010000157, 010000166, 010000167, 010000171, 010000174, 010000177, 010000181, 010000190, 010000194, 010000196, 010000202, 010000207, 010000210, 010000218, 010000223, 010000231, 010000237, 010000246, 010000250, 010000253, 010000258, 010000267, 010000279, 010000289, 010000290, 010000293, 010000318, 010000323, 010000324, 010000335, 010000348, 010000350, 010000353, 010000354, 010000363, 010000382, 010000391, 010000398, 010000400, 010000404, 010000406, 010000417, 010000420, 
21:11:08,728 INFO  [STDOUT] 010000426, 010000431, 010000439, 010000445, 010000447, 010000454, 010000461, 010000480, 010000483, 010000499, 010000501, 010000502, 010000504, 010000514, 010000524, 010000540, 010000541, 010000546, 010000551, 010000565, 010000578, 010000582, 010000588, 010000603, 010000635, 010000650, 010000657, 010000694, 010000703, 010000707, 010000710, 010000712, 010000760, 010000781, 010000810, 010000814, 010000815, 010000824, 010000827, 010000841, 010000845, 010000862, 010000864, 010000865, 010000872, 010000873, 010000877, 010000889, 010000890, 010000894, 010000901, 010000905, 010000906, 010000916, 010000928, 010233887, 010129601, 010000957, 010000962, 010000970, 010000987, 010000995, 010000999, 010001000, 010000001, 010000002, 010000004, 010000005, 010000007, 010000014, 010000017, 010000024, 010000046, 010000067, 010000071, 010000092, 010000094, 010000096, 010000099, 010000102, 010000104, 010000110, 010000123, 010000128, 010000133, 010000142, 010000145, 010000152, 010000165, 010000176, 010000180, 010000191, 010000199, 010000203, 010000208, 010000228, 010000234, 010000238, 010000248, 010000257, 010000264, 010000271, 010000272, 010000275, 010000283, 010000286, 010000288, 010000301, 010000306, 010000307, 010000311, 010000315, 010000320, 010513071, 010000351, 010000352, 010000366, 010000373, 010000383, 010000393, 010000401, 010000409, 010000410, 010000412, 010000414, 010000415, 010000450, 010000451, 010000453, 010000467, 010000468, 010000470, 010000481, 010000496, 010000512, 010000515, 010000519, 010000521, 010000535, 010000539, 010000560, 010000563, 010000574, 010000575, 010000592, 010000597, 010000601, 010000604, 010000612, 010000626, 010000630, 010000632, 010000634, 010000638, 010000641, 010000644, 010000652, 010000665, 010000675, 010000676, 010000697, 010000714, 010000720, 010000722, 010000735, 010000757, 010000765, 010000766, 010000772, 010000779, 010000784, 010000818, 010000822, 010000826, 010000852, 010000856, 010000866, 010000883, 010000886, 010000892, 010000897, 010000909, 010000918, 010000926, 010000927, 010129907, 010184634, 010000960, 010000985, 010000986, 010000009, 010000036, 010000045, 010000052, 010000056, 010000061, 010000069, 010000073, 010000075, 010000084, 010000093, 010000103, 010000118, 010000122, 010000125, 010000138, 010000170, 010000178, 010000182, 010000184, 010000186, 010000213, 010000215, 010000217, 010000226, 010000233, 010000235, 010000241, 010000243, 010000244, 010000247, 010000249, 010000256, 010000266, 010000268, 010000273, 010000277, 010000285, 010000287, 010000292, 010000296, 010000297, 010000308, 010000309, 010000316, 010000325, 010000331, 010000343, 010000386, 010000389, 010000390, 010000392, 010000396, 010000408, 010000478, 010000479, 010000482, 010000492, 010000497, 010000498, 010000509, 010000529, 010000545, 010000552, 010000555, 010000566, 010000567, 010000569, 010000611, 010000613, 010000627, 010000628, 010000633, 010000647, 010000649, 010000671, 010000672, 010000687, 010000699, 010000708, 010000713, 010000719, 010000723, 010000739, 010000740, 010000741, 010000749, 010000751, 010000753, 010000773, 010000792, 010000794, 010000797, 010000805, 010000808, 010000812, 010000820, 010000825, 010000829, 010000838, 010000840, 010000858, 010000861, 010000870, 010000876, 010000888, 010000895, 010000900, 010000902, 010000911, 010000923, 010000929, 010000948, 010000951, 010000952, 010000956, 010000959, 010000965, 010000967, 010000979, 010000984, 010000990, 010000013, 010000018, 010000027, 010000033, 010000044, 010000047, 010000055, 010000072, 010000074, 010000079, 010000087, 010000088, 010000121, 010000148, 010000151, 010000156, 010000158, 010000173, 010000179, 010000188, 010000201, 010000214, 010000220, 010000221, 010000227, 010000229, 010000236, 010000242, 010000254, 010000255, 010000259, 010000274, 010000280, 010000291, 010000298, 010000310, 010000312, 010000313, 010000314, 010000321, 010000322, 010000336, 010000337, 010000338, 010000358, 010000372, 010000374, 010000376, 010000387, 010000388, 010000395, 010000402, 010000407, 010000425, 010000432, 010000435, 010000444, 010000456, 010000457, 010000464, 010000487, 010000490, 010000505, 010000508, 010000520, 010000527, 010000538, 010000542, 010000547, 010000554, 010000570, 010000579, 010000590, 010000593, 010000594, 010000600, 010000618, 010000645, 010000662, 010000666, 010000667, 010000691, 010000696, 010000698, 010000700, 010000704, 010000718, 010000721, 010000725, 010000734, 010000737, 010000745, 010000748, 010000750, 010000758, 010000793, 010000809, 010000811, 010000844, 010000851, 010000855, 010000863, 010000869, 010000896, 010000899, 010000903, 010000914, 010000915, 010244376, 010000942, 010000943, 010000950, 010000961, 010000969, 010000974, 010000980, 010000982, 010000983, 010000997, 010000003, 010000008, 010000015, 010000025, 010000057, 010000058, 010000059, 010000066, 010000089, 010000100, 010000119, 010000124, 010000143, 010000147, 010000163, 010000183, 010000192, 010000198, 010000200, 010000209, 010000251, 010000262, 010000263, 010000270, 010000281, 010000284, 010000294, 010000295, 010000329, 010000330, 010000339, 010131964, 010000357, 010000359, 010000370, 010000379, 010000385, 010000397, 010000422, 010000423, 010000429, 010000433, 010000434, 010000449, 010000458, 010000465, 010000471, 010000476, 010000486, 010000493, 010000510, 010000528, 010000531, 010000536, 010000549, 010000553, 010000556, 010000559, 010000561, 010000573, 010000584, 010000585, 010000587, 010000589, 010000591, 010000596, 010000598, 010000609, 010000610, 010000616, 010000619, 010000636, 010000637, 010000643, 010000648, 010000653, 010000655, 010000656, 010000658, 010000659, 010000660, 010000673, 010000677, 010000678, 010000682, 010000684, 010000685, 010000701, 010000706, 010000709, 010000711, 010000724, 010000728, 010000729, 010279363, 010000733, 010000746, 010000752, 010000767, 010000769, 010000771, 010000775, 010000790, 010000800, 010000816, 010000823, 010000837, 010000850, 010000868, 010000871, 010000882, 010000885, 010000907, 010000908, 010000913, 010000920, 010000922, 010421388, 010000945, 010000953, 010000954, 010000955, 010000963, 010000972, 010000973, 010000977, 010000981, 01C] at ?.?(?:?)


Please help!
Re: Setting batch size in EclipseLink 1.1.4 [message #854834 is a reply to message #854206] Tue, 24 April 2012 09:15 Go to previous messageGo to next message
Matti Hansson is currently offline Matti HanssonFriend
Messages: 68
Registered: July 2009
Member
I did a trial without using EclipseLink and I got the same result. This seems to be an issue with the Oracle JDBC driver, specifically prepared statements.
Re: Setting batch size in EclipseLink 1.1.4 [message #857386 is a reply to message #854206] Thu, 26 April 2012 13:48 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

This is a database limitation. You need to reduce the size and execute multiple queries.


James : Wiki : Book : Blog : Twitter
Previous Topic:jpa primary key violation when persisting many-to-many columns
Next Topic:Madness with compound primary key
Goto Forum:
  


Current Time: Fri Apr 26 19:46:44 GMT 2024

Powered by FUDForum. Page generated in 0.03126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top