1. Open database in embedded mode
2. Run a considerably large transaction - for example, one that creates 10 - 20 MB of db logs
4. Do NOT close the Connection
5. Exit the application (through System.exit() for example)
6. Restart the application and open the database
Opening connection is extremely slow. It takes up 30- 60 seconds on the 10-20 MB transaction, and for larger transactions it takes forever.
Looking at the process with FileMon utility, I can see that redo log files are mostly read 1 byte at a time.
I bet you can improve the performance 100-fold by getting the whole log into memory first.