Things that you can do to improve the performance of
Derby applications fall into
three categories.
Avoiding table scans of large tables
Derby is fast and efficient, but when tables are huge, scanning tables might take longer than a user would expect. It's even worse if you then ask Derby to sort this data.
Avoiding compiling SQL statements
When you submit an SQL statement to Derby, Derby compiles and then executes the statement. Compilation is a time-consuming process that involves several steps, including optimization, the stage in which Derby makes its statement execution plan. A statement execution plan includes whether to use an index, the join order, and so on.
Shielding users from Derby class-loading events
JVMs tend to load classes as they are needed, which means that the first time you need a class in a piece of software, it takes longer to use.