SQLite optimization.