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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: most efficient method of storing records held in array Date: Mon, 23 Mar 2015 18:35:29 +0100 Organization: cbb software GmbH Message-ID: <1maq1tzx3kcwk.15fvvg45r5txy$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: w2sqUGEBZqsVBYNL7Ky3Kg.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: news.eternal-september.org comp.lang.ada:25227 Date: 2015-03-23T18:35:29+01:00 List-Id: On Mon, 23 Mar 2015 04:56:40 -0700 (PDT), tonyg wrote: > I have several fairly long arrays of records that I want to store to disk > on a as needed basis, but I don't want to use a database. > > Especially after reading that comparison between database speed and > persistant objects that was recently floated. > > I did look at the persistent objects library in the Dmitrys Kazakov > components library but I'm finding it difficult to understand what is > going on there despite the large amount of documentation. > > Are there any other examples out there using this library? I was thinking > of a generic library using direct io to save on the index whenever the > values are changed. The implementation of the persistence layer is based on Direct_IO, actually. > What do you guys think? Everything depends on the intended usage. Whether data are immutable, how frequent in relation are insertion, seek, deletion, whether elements have fixed or variable size, should access be task-safe, which operations are required to be atomic, should the persistent structure survive hard system crashes, should the container file keep several structures, how they are identified (catalogue etc), could the structures be removed independently and so on. There is no ultimate solution and efficiency (defined in any of multiple possible ways) highly depends on the choices made. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de