On 29/02/12 13:18, Paolo Castagna wrote:
Andy Seaborne wrote:
An incremental version is quite possible. It could load to a dataset,
ensuring the id are right, then do index-merging.
Hi Andy,
can you expand a little bit on "ensuring the id are right"
and "index-merging" bits? ;-)
To "ensure ids are right" the incremental loader would need
to re-use the same node table of the exiting db, right?
Yes.
(Hash-ids don't remove the need but they would change the problem to
allowing two idenpendent databases to be merged by messing around with
the lowest level data structures.)
I have been thinking on how to merge two TDB indexes, but
it does not seem a trivial problem to me... not with the
current node ids.
The indexes are just a stream of sorted numbers (OK - the numbers are
192 bits long but that's what computers are for :-) It's a plain merge
of two already sorted streams, with duplicate removal, using the B+Tree
rebuilder.
Paolo
Andy