[OFBiz] Users - Re: Techniques for moving large tables help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Users - Re: Techniques for moving large tables help

David Riggle
I did try a getting a EntityListIterator by using the
delegator.findListIteratorByCondition() method, but I would get the same
problem, the computer runs out of memory. Here is a small code snippet:

        List inventoryOrder = new LinkedList();
        Collection inventoryCollection = new LinkedList();
        inventoryCollection.add("item");
        inventoryCollection.add("class");
        inventoryCollection.add("descrip");
        inventoryCollection.add("cost");
        inventoryCollection.add("onhand");
        inventoryCollection.add("onorder");
        inventoryCollection.add("unitms");
        inventoryCollection.add("seq");
        inventoryCollection.add("supplier");
        inventoryCollection.add("vpartno");
        inventoryCollection.add("taxcode");
        inventoryCollection.add("stkcode");
        inventoryOrder.add("item");
        EntityListIterator sourceListIterator =
delegator.findListIteratorByCondition("arinvt01", /*condition*/ null,
                                               inventoryCollection,
                                               inventoryOrder);


Thanks,

- David Riggle
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Re: Techniques for moving large tables help

David E. Jones

Which database and JDBC driver are you using? Note that not all JDBC  
drivers support using the database cursor to page through result sets  
(and thereby avoid loading the entire results into memory).

Also, what are you doing with sourceListIterator after you get it  
here? If you call the get all results method you're pulling it into  
memory anyway. Basically (as described in the JavaDoc) you just want  
to do an iteration and call next() over and over.

-David


On Oct 13, 2005, at 11:40 AM, David Riggle wrote:

> I did try a getting a EntityListIterator by using the  
> delegator.findListIteratorByCondition() method, but I would get the  
> same problem, the computer runs out of memory. Here is a small code  
> snippet:
>
>        List inventoryOrder = new LinkedList();
>        Collection inventoryCollection = new LinkedList();
>        inventoryCollection.add("item");
>        inventoryCollection.add("class");
>        inventoryCollection.add("descrip");
>        inventoryCollection.add("cost");
>        inventoryCollection.add("onhand");
>        inventoryCollection.add("onorder");
>        inventoryCollection.add("unitms");
>        inventoryCollection.add("seq");
>        inventoryCollection.add("supplier");
>        inventoryCollection.add("vpartno");
>        inventoryCollection.add("taxcode");
>        inventoryCollection.add("stkcode");
>        inventoryOrder.add("item");
>        EntityListIterator sourceListIterator =  
> delegator.findListIteratorByCondition("arinvt01", /*condition*/ null,
>                                               inventoryCollection,
>                                               inventoryOrder);
>
>
> Thanks,
>
> - David Riggle
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

smime.p7s (3K) Download Attachment