Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 39046 invoked from network); 2 Sep 2005 05:43:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Sep 2005 05:43:52 -0000 Received: (qmail 96696 invoked by uid 500); 2 Sep 2005 05:43:51 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 96666 invoked by uid 500); 2 Sep 2005 05:43:50 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 96653 invoked by uid 99); 2 Sep 2005 05:43:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2005 22:43:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.187.161.76] (HELO plesk.loudant.com) (208.187.161.76) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2005 22:44:03 -0700 Received: (qmail 15451 invoked from network); 2 Sep 2005 04:35:29 -0000 Received: from unknown (HELO bread.mshome.net) (59.93.73.24) by dynamic245-208.lanset.com with SMTP; 2 Sep 2005 04:35:26 -0000 Date: Fri, 02 Sep 2005 11:13:28 +0530 To: "Derby Discussion" Subject: Re: BLOB : java.lang.OutOfMemoryError References: <1125495665.7293.32.camel@Greg.site> <4315BD7C.7050206@sbcglobal.net> <1125500060.7293.42.camel@Greg.site> <4315D196.5040708@Sourcery.Org> <43174240.5010706@gmail.com> From: "Rajes Akkineni" Organization: Vimukti Technologies Pvt Ltd Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <43174240.5010706@gmail.com> User-Agent: Opera M2/8.02 (Win32, build 7680) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Dose that mean if i have 4 tables with BLOBs it will take up 120mb ~? I have made a testing program..but as you said it worked fine. But in my product the situation is much complex. May be due to that is it now taking more memory. The environment is... 1. Derby is used through as eclipse plugin 2. It is beeing used from two different plugins to create around 20 (15,5)tables. 3. I have make a static class to do all database operations with syncronized methods which are beeing accessed from different diff threads. 4. There are 5 tables with BLOB columns out of which ony one table is beeing used. 5. As JXTA is beeing used i think it takes most of the memory. (I dont know how to mesure the heap usage) Here are the my tables and the select query which is giving problem with BLOB and later with the data(not able to retrive which i have inserted). TABLE CREATION STATEMENT -------------------------- "CREATE TABLE dataQueue(messageId BIGINT NOT NULL, objectId VARCHAR(100) ,data BLOB, sentId BIGINT, sequenceNo INTEGER,inoutstate SMALLINT, PRIMARY KEY(objectId,sequenceNo,inoutstate))" "CREATE TABLE objectQueue(objectId VARCHAR(100), source VARCHAR(100),destination VARCHAR(100), priority SMALLINT, type SMALLINT, size INTEGER, splitCount INTEGER, date DATE, isGroup SMALLINT,inoutstate SMALLINT)" "CREATE TABLE groups(groupId VARCHAR(100),identityId VARCHAR(100), sentId BIGINT)" SELECT QUERY ------------- SELECT dq.messageId,dq.objectId,dq.data,dq.sentId,dq.sequenceNo,oq.source,oq.destination,oq.priority,oq.type,oq.size,oq.splitCount,oq.date,oq.isGroup from dataQueue as dq,objectQueue as oq,groups as g where ((dq.objectId=oq.objectId) AND ((oq.destination=?) OR (oq.destination =g.groupid AND g.identityId=?)) AND ((dq.sentId=0) OR (dq.sentId > g.sentId)) AND (oq.inoutstate=0)) ORDER BY oq.priority,dq.sentId,dq.sequenceNo" Is there some thing very stupid thing that i am doing here? This is my second database dependednt application. So i dont have much experiance. Thanks Rajesh On Thu, 01 Sep 2005 23:32:40 +0530, Sunitha Kambhampati wrote: > Rajes Akkineni wrote: > >> Hi, >> >> I have got the similar problem. > >> I was unable to insert bigger files in to the database. >> But my situation is little different than this. I am not inserting >> total 40mb file in one blob. >> I have split them in to 64kb chunks and inserting in multiple rows. >> >> I got outofmemory error. > > Are you using embedded driver or the network client driver ? I think > the issue discussed in this earlier thread is referring to the client > driver. ( -DERBY-326). But if you are noticing the problem with > embedded, it would be great if you could post a reproduction program, > so we can take a look. > > I have tested inserting 1000 rows of 64kb blobs on my T40 laptop and it > works ok both with default jvm heap size and also with restricting the > jvm max heap size to 40mb. Note by default , for a table containing blob > column, page size is 32k and page cache is 1000 pages, so the pagecache > would take about 32mb of memory. > >> >> Now i seem to have another issue with the DERBY. >> when i am Inserting, Select data using prepared statements(they are >> all created once, and used from different different threads later) >> some time i am not able to get the data which i have inserted. i >> checked the insert operation. it is successfull but later when i query >> from different thread it is not showing any rows in the table. > > Are you running with autocommit off, if so might be good to check if a > commit was given after the insert or not. > > Sunitha. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/