I'm using Derby as my database of choice for my java application. The application basically stores a lot of information from different network resources while itβs running. It's basically just collecting information and stores it in the Derby DB.
In my daily working tasks there is no issue with the startup time of my application but recently I let it run for about a month which increased the size of the Derby DB to around 2.9 GB.
After closing and opening my application I had to wait for about 10 minutes until the application started up. I immediately closed and started the application again and this time it took only a few seconds, like normal. I was also very surprised to see that the size of my Derby DB decreased to 1.2 GB.
My question: Is it possible that Derby optimizes the DB on every startup? Could this reason for the long load time and if so, is there anything I can do to avoid it?