# DML statements and performance

This section provides more in-depth information about how Derby executes queries, how the optimizer works, and how to tune query execution.

- Performance and optimization
  Optimization means that a DBMS makes the best (optimal) choice of access paths, join order, and join strategy.
- Locking and performance
  Row-level locking improves concurrency in a multi-user system. However, a large number of row locks can degrade performance.
- Non-cost-based optimizations
  The optimizer makes some non-cost-based optimizations, which means that it does not consider them when determining the access path and join order.
- Overriding the default optimizer behavior
  You can override the default behavior of the Derby query optimizer by including a --DERBY-PROPERTIES clause and an associated property as a comment within an SQL statement.