diff --git a/src/claimtrie/trie.cpp b/src/claimtrie/trie.cpp index 86da57bda..0dab8b590 100644 --- a/src/claimtrie/trie.cpp +++ b/src/claimtrie/trie.cpp @@ -157,6 +157,7 @@ std::size_t CClaimTrie::cache() bool CClaimTrie::SyncToDisk() { + db << "PRAGMA optimize"; // alternatively, switch to full sync after we are caught up on the chain return sqlite::sync(db) == SQLITE_OK; } diff --git a/src/txdb.h b/src/txdb.h index 2bdb3dc92..573048c8b 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -59,7 +59,7 @@ class uint256; //! No need to periodic flush if at least this much space still available. static constexpr int MAX_BLOCK_COINSDB_USAGE = 10; //! -dbcache default (MiB) -static const int64_t nDefaultDbCache = 480; +static const int64_t nDefaultDbCache = 4096; //! -dbbatchsize default (bytes) static const int64_t nDefaultDbBatchSize = 16 << 20; //! max. -dbcache (MiB)