Hi, I have a database that I have been storing binary data in a Blob column. I've decided that it was a bad idea and I'd like to remove it from the DB and store it on the filesystem. I've written a small program to extract the contents from the DB and save it to the file system. It works except it runs out of memory using the default 64 MB. While I could increase the -Xmx setting it seems superflous. I've profiled the application and majority of the memory is being occupied by derby. I see lots of classes like org.apache.derby.impl.services.cache.CachedItem and org.apache.derby.impl.store.raw.data.StoredPage holding 32KB byte buffers.
Is there a way to change derby so that it would drop those cached buffers? Or a way to turn off caching for blobs? Or is there a way to optimize the memory a little more so that it would run in a smaller footprint? This program will have to run on DB that could be in the GB size. I just need to extract the contents and save it out to disk. Modify the DB to drop the Blobs, and re-attach those records to the filesystem paths of the files. Thanks Charlie
