Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For single-threaded performance the most important thing to look at is your transaction model.</p> <p>If you have tried putting more data in one transaction and it failed you probably got a JET_errOutOfVersionStore. Esent has to track undo information for all operations performed in a transaction (to enable rollback) and that information is stored in the version store. The default size of the version store is quite small. You can increase it with the JET_paramMaxVerPages system parameter. A value of 1024 (64MB of version store) will enable quite large transactions. I suggest doing 100-1000 insertions per transaction.</p> <p>When you call JetCommitTransaction Esent will flush the log to disk, generating a synchronous I/O. To avoid that pass JET_bitCommitLazyFlush to JetCommitTransaction. Your transactions will still be atomic but not durable in the case of a crash (things will be fine if you exit normally). It looks like that should be find for your use.</p> <p>If you are inserting records in ascending order then you might be able to get away with a single-threaded application. If you can change your implementation to do sequential inserts you should -- they are a lot faster. For random inserts multiple threads can be useful. To use multiple threads you just need to create new sessions (JetBeginSession) and have them open the database (JetOpenDatabase). Esent uses snapshot isloation (<a href="http://en.wikipedia.org/wiki/Snapshot_isolation" rel="noreferrer">http://en.wikipedia.org/wiki/Snapshot_isolation</a>) so cannot see modifications made by other sessions which aren't committed or commit after your transaction begins. This is different than read-committed where you can see changes once another session commits. You might need to think about how to divide up the work to deal with this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload