Let say i have millions of records in the oracle table and I want to put every record to the java list. At the end I want to compare this list with another one. Unfortunately I cannot do this at once because the table is to big and I don't have enough memory to store such a huge list. My idea is to do this partially. For example take each time 500000 records from the table and save it in the list, compare with another one and then clear it. So for the first time a will take records from DB with id 1-500000, then 500001-100000 and so on. But the question is how to do this? Without this requirement I would do something like this:Let say i have millions of records in the oracl