# Tune the size of database pages

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:

- You are storing large objects.
- You have very large tables (over 10,000 rows).

  For very large tables, large pages reduce the number of I/Os required.

- For read-only applications, use a large page size (for example, 32K) with a pageReservedSpace of 0.

You might need to experiment with page size to find out what works best for your application and database.

- Performance trade-offs of large pages
  Using large database pages benefits database performance, notably decreasing I/O time.

Parent topic: Performance tips and tricks
Related concepts
Use prepared statements with substitution parameters
Create indexes, and make sure they are being used
Ensure that table statistics are accurate
Increase the size of the data page cache
Avoid expensive queries
Use the appropriate getXXX and setXXX methods for the type
Tune database booting/class loading
Avoid inserts in autocommit mode if possible
Improve the performance of table functions
Configure Derby to use an in-memory database
Increase the concurrency of sequences
Shut down the system properly
Put Derby first in your classpath