Re: Memory Leak

"Christopher G. Stach II" <[email protected]> Fri, 26 Feb 2010 02:16:30 -0600 (CST)
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
----- "William Taylor" <[email protected]> wrote:

> On Feb 25, 2010, at 11:44 PM, Christopher G. Stach II wrote:
> >> Working on some code where I select 4 million rows and store the
> >> results in a short array.
> > 
> > Don't do that.
> > 
>    Why? What is your reasoning behind *not* doing that ? 
>    Perhaps you understand my application better then I ?

4M rows sounds like a batch process. There are batch design patterns that solve the same problem in a fixed memory size. Unless you have an oddball case where you need to process all 4M in a single transaction, you can use those. If you do need to process them in a single transaction, you will need to make some tradeoffs (consistency or availability, most likely).

-- 
Christopher G. Stach II
http://ldsys.net/~cgs/

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]