db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@gmail.com>
Subject Re: Import data from large Oracle table
Date Wed, 14 Mar 2007 22:50:08 GMT
Sedillo, Derek (Mission Systems) wrote:

> There are no foreign keys or triggers on the tables.  But there are
> indexes which might be slowing things down.  So I might drop the indexes
> and try running import again.  

Just so you're aware, there is a known issue with Derby where creation of an 
index before inserting data can lead to bad statistics and therefore bad 
optimizer cost estimates, thus resulting in poor performance.  See DERBY-269.

Or put another way, it's best to insert the data first and *then* create the 

So even if it doesn't speed up the import operation itself, it is still a good 
idea to insert data first and create indexes afterward.  Doing so will help the 
optimizer find better plans for subsequent queries against the relevant tables.


View raw message