db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: Inserting 100049 rows into a derby table
Date Thu, 01 Feb 2007 18:06:32 GMT
The following information would help to answer your question:
1) complete ddl of the table in question (ie. the create table statement and any
   indexes on that table).
2) a code segment of how you are inserting the data, streams can cause problems if not used
correctly with large data types.
3) Some estimate of the size of rows/size of data being inserted.  You may
    have provided this info, but wasn't sure if the 100k rows are the entire
    db or if this is an additional 100k rows into an existing 67mb db.
4) are you embedded or client/server?

Without that info my best guess is the issue is the derby data cache which 
defaults to 1000 pages.  These pages can be 32k in size.  Answer to 1 will
tell me what page size derby choose for your table, unless you used derby
properties to change the default.  Derby by default will always try to fill up
those 1000 pages in memory, so it will try to cache all the data you are
inserting up to those 1000 pages.  This cache is configurable, so if you 
want less data cached it is safe to set this down all the way to 40 pages.
This may or may not be your issue, but is easy to test out.  

Trevor Simpson <tasnmeg@bigpond.net.au> wrote:       Can anyone help ?
  
 I have a derby database with one table. The table  includes the primary key plus 7 other
columns. There is an index on 4 of those 7  columns.
  
 I am inserting 100,049 rows into the table and  no-matter what I try, I need more than 32MB
to insert those records (at one  time).
  
 I have tried turning autocommit on and off, I have  tried using Batch processing and normal
insert processing but whatever I do, I  need more than 32MB to insert the 100,049 rows into
the table at one time  . When using java -Xmx48m to insert the 100,049 rows, free  space is
around 12 to 14 MB during the insert process.
  
 I am trying to understand why the derby database  management system needs approx 36MB to
insert the 100,049 rows. The  database is around 67.8MB in size, when all rows have been inserted.
 What does derby keep in memory which requires approx 36MB during  the entire insert process?
  
 Any help will be most appreciated.
  
 Regards
 Trevor Simpson


Mime
View raw message