On 3 May 2019, at 3:01pm, Zhu, Liang [AUTOSOL/ASSY/US] <[email protected]> wrote:
> In my current project, we have the need to inserting and deleting data to and > from the database between 1 and 10 ms for 24/7. I am seeking the > clarification on the following questions > > 1. what is the throughput requirements are possible using Sqlite API?, in > other words, what is the max speed can my inserting and deleting operation > be? The figures you quote are possible. The fastest speeds I've seen for SQLite are 96,000 INSERTs per second. But SQLite speed depends most on the operating system and hardware (especially file storage) system you are using. Fortunately SQLite performs the same in a tiny test program and in a big production program, so you can write a small test program to run on your hardware and get useful and interesting results from it. Another thing which influences speed is whether you have one thread/connection talking to the database, or have many trying to talk to the database at the same time. > 2. When we inserting and deleting data at the speed mentioned above, what > kind database maintenance do we need to do to maintain the performance of the > database? SQLite databases require no maintenance. They should continue working forever without attention. However, you might like to use a yearly routine which checks the database for corruption. It might also rebuild the database (like defragmenting) which might speed things up slightly, or it might make no change at all. > 3. How is constant deleting and insert effect the database performance? SQLite should not slow down much even after millions of changes to a database. SQLite automatically reclaims file space released by deleting data. You might find it useful to read <https://www.sqlite.org/whentouse.html> Simon. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

