I am trying to use sqlite in my application as a kind of cache. I’m saying that elements never expire from my cache, and I didn’t store anything. I just need to use the cache to store all the identifiers that I processed before. I do not want to recycle anything twice.
I enter items in the cache with 10,000 messages per second for a total of 150 million messages. My table is pretty simple. It contains only one text column in which identifiers are stored. I did all this in memory using a dictionary, however I process millions of messages and, although it is fast, I ran out of memory after a while.
I have studied sqlite and performance, and I understand that configuration is key, however, I still get terrible performance on inserts (I have not tried selecting yet). I can not keep up even with 5000 inserts / sec. Maybe it's as good as it gets.
My connection string is as follows:
Data Source=filename;Version=3;Count Changes=off;Journal Mode=off; Pooling=true;Cache Size=10000;Page Size=4096;Synchronous=off
Thanks for any help you can provide!
source share