From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!nntpspool01.opticnetworks.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada vs SQLite3 benchmark Date: Thu, 18 Sep 2014 09:27:21 +0200 Organization: cbb software GmbH Message-ID: <122qvkxwx9207$.x2ietmtp83wg$.dlg@40tude.net> References: <10k8o95prdhuj$.195flbmen5kex.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: yj8+JIQUMOEawvIM7K49kA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:189038 Date: 2014-09-18T09:27:21+02:00 List-Id: On Thu, 18 Sep 2014 07:50:09 +0200, Georg Bauhaus wrote: > On 17.09.14 18:51, Dmitry A. Kazakov wrote: >> http://ada-programming.blogspot.de/2014/09 >> >> The implementation of B-tree is based on Ada.Direct_IO with a transaction >> layer, e.g. for safety against system failure. > > What will the comparison look like if you let SQLite3 open the file > ":memory:", thus an in-memory data base? Which will require to then > occasionally .dump its contents into another, persistent SQLite3 database. > > http://www.sqlite.org/inmemorydb.html In would make no sense, IMO. Let us consider the use case when everything fits into the memory. Why not to use plain containers then? Even if some sort of persistency is needed in this scenario, a persistency layer can be added to a plain Ada container at *zero* performance cost. E.g. http://www.dmitry-kazakov.de/ada/components.htm#persistent_objects I can tell without any benchmarks that Ada's standard containers or any other would easily beat memory-mapped SQLite. P.S. I had serious problems with the Kyoto Cabinet in the past. KC is a single-file B-tree implementation written in C. It is not fail-safe, but that was irrelevant to me. KC did what you described by OS means, it opened the file as memory mapped. I was unaware of that until the DB grew 2GB, then ... I am a bit allergic to memory-mapped files since. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de