Federico Spinazzi wrote:Hmm,
- LargeSelect gives me different results on the total number of object retrieved with different parameters;
LargeSelect doesn't know the total number of records until such time as the buffer of records hits the last record. Prior to this it just indicates that more records exist than the number that have been retrieved so far. Is this the behavior you are seeing or is it something else? If you do believe there is a problem can you provide a test case?
Cheers,
Scott
I have tried to retrieve about 37000 record from a DB2 table with large select because of OutOfMemory error otherwise. I gave up also because it was too slow.
The code is the following
try {
Criteria crit = new Criteria();
LargeSelect ls = new LargeSelect(crit,
3000, "it.masterhouse.torque.termopoli.ArticoliPeer");
int total = 0;
while (ls.getNextResultsAvailable()) {
List l = ls.getNextResults();
total += l.size();
}
System.out.println("record selected: " + total);
} catch (Throwable t) {
t.printStackTrace();
}
(I don't mean this code make sense, I want to spot the 'bug')
Whan trying to choose the best values for pageSize and memoryPageLimit I discovered that many combinations gave me the correct result while a pageSize of 3000 ( as in the code) gives me 69000 records instead of 37187.
I can try to move the data in hsql and see if the problem is here again, because I' dont know another way to buil a test case ...
However, I'm just retring the failing test and I'm getting an OutOfMemory exception ...
Moreover, if I try with pageSize 10 and memoryPageLimit 5000 I get an java.util.ConcurrentModificationException ...
I think that large select, if useful, should be reworked.
As I'll need to use Torque in the future I candidate myself to help.
Can someone help me to understand how I can do that?
Thank you very much for you attention.
Federico Spinazzi
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
