See if setting PRAGMAs (and fixing the transaction) speeds up performance.