adding CACHE_SIZE=32768 to the jdbc url helped speed up the updates to 6
ms. So this is better, but still a lot slower that the inserts. I'm
timing the inserts like this:
long startTime=System.currentTimeMillis();
try {
getDao().createOrUpdate(combinedTestDay);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
long endTime=System.currentTimeMillis();
long totalTime=endTime-startTime;
System.out.println("createOrUpdateTime="+totalTime);
and the output is always:
createOrUpdateTime=0
On Monday, October 28, 2013 9:32:23 PM UTC-7, TrendTimer.com wrote:
>
> When I use "createOfUpdate", I can insert 10000 rows in the table almost
> immediately.
>
> getDao().createOrUpdate(combinedTestDay);
>
>
> but then when I try to update these same items, it's taking around 70 ms
> each:
>
> getDao().update(saveObject);
>
> So for 10,000 updates that's 70,000ms or around 70 seconds.
>
> Can someone explain what might be happening? Does anyone know how to work
> around this issue? I'd appreciate your help! thanks,
>
> Stephen Gower
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.