Tune the size of database pages. Using large database pages has provided a performance improvement of up to 50%. If you use large database pages, increase the amount of memory available to Derby.
In most situations, use the default page size of 4K (the size operating systems use). Increase the page size in any of these cases:
For very large tables, large pages reduce the number of I/Os required.
You might need to experiment with page size to find out what works best for your application and database.