[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-recutils] Indexing plan

From: Jose E. Marchesi
Subject: Re: [bug-recutils] Indexing plan
Date: Fri, 11 May 2012 12:25:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

    >     Now I think it would be simpler to store all records in the index 
    >     so parsing the recfile wouldn't be needed.  My other idea was to store
    >     only the offsets in the recfile of their beginning, it would require
    >     e.g. supporting seeks in parsers and keeping the file open while the
    >     database is used.
    > I much prefer the second option.  To keep the file open must not be an
    > issue.
    Will think more what changes would be needed for this.  Seekable parsers
    would be also useful with lazy reading without indices.

Yes, definitely.  An mmap-based solution could be a good option.
    > $ recfix add-index -f AField
    > In the example, AField is not required to be the key of the record.  We
    > can also create a "default" field for any %key defined.  Is there a
    > reason why we would need to mark AField in the record descriptor?
    > recsel must be able to determine if there is an index I on the rset S
    > for the field F in a given index file.
    So "recfix build-index" would make indices only for keys, or for all
    fields which have indices in the already found index file?

The second option sounds sensible.

    A separate "add-index" command would be more useful if the index
    file could be incrementally changed, this might be simple for just
    adding new indices.

Yes, that is definitely something we want to support.  To determine
which field is accessed more often requires to do real work with the
database first.  IMO the ability of adding new indexes to the file in an
incremental way is a must.

Jose E. Marchesi         http://www.jemarch.net
GNU Project              http://www.gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]