db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunitha Kambhampati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-108) Document performance tip for inserts in tuning guide
Date Mon, 20 Dec 2004 20:19:14 GMT
Document performance tip for inserts in tuning guide

         Key: DERBY-108
         URL: http://nagoya.apache.org/jira/browse/DERBY-108
     Project: Derby
        Type: Improvement
  Components: Documentation  
    Reporter: Sunitha Kambhampati
    Priority: Minor
     Fix For:

Need to add this important performance tip in the tuning guide document.
Could probably be added as Tip #8 in http://incubator.apache.org/derby/manuals/tuning/perf20.html#HDRSII-PERF-25864
Avoid inserts in autocommit mode if possible:
Inserts can be painfully slow in autocommit mode. The reason is that each commit involves
a flush of the log to the disk  for each insert statement. The commit will not return until
a physical disk write has been executed. 

To speed things up, there are 2 possibilities
- Run in autocommit false mode and execute a number of inserts in one transaction and then
explicitly issue a commit. 
- If your application allows an initial load into the table, one can use the import system
procedures to insert data into a table. 
If loading into an empty table using these interfaces, derby will not log the
individual inserts. The reason is  recovery understands that a backout of this
operation is an empty table, and the data in the table is forced to
disk before the transaction commits.

References from derby mailing lists:

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message