On 28 Mar 2012, at 10:32am, Simone P. Lossani <[email protected]> wrote:
> I need to store data in a table very quickly. Let's say new data each 10 msec. > I tryed with DB on disk but obviously was not possible to reach the correct > performance. > So I tryed with in-memory DB and in this case the performance results are > good. > The problem is that I can't share the in-memory database with other > applications. > I red a lot of article and documentation but I have not solved the problem. > Maybe with temporary DB I can have the same performance and also I can share > DB? > Have you some suggestion? Do you need to read while the data is being written ? Or do you have a phrase where you just do writing, and then another when you just do reading ? If you have two separate phases, then you can do all your INSERTs in one big TRANSACTION. Or perhaps write a little code which makes a separate transaction for every one thousand or ten thousand INSERT commands. This will dramatically reduce the amount of writing SQLite needs to do. If you do not declare your own transactions, SQLite surrounds each INSERT with its own. Try using a Solid State Drive (SSD) instead of a rotating hard disk. The problem with a rotating hard disks is that you can read or write only when the disk is rotated to the right place. Believe it or not, this is a bottleneck for SQLite throughput. Standard spinning speeds like 7500 rpm can seriously slow down your computer's ability to handle data. There may be more things you can do but we'd have to see your CREATE commands for tables and indexes. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

