Re: Secondary database to index two primary databases? -
04-09-2006
, 09:26 PM
Hi Leif,
No, that isn't possible. Berkeley DB expects every entry in a
secondary index to exist in the primary. Only primary keys are stored
in a secondary, not a (database, primary key) pair.
You could get a similar effect by having a secondary index associated
with each of the primaries, but you'll need to walk two cursors over
the secondaries and merge the results. If you only need equality
joins, Berkeley DB can create a single cursor that walks multiple
secondaries in this way via the DB->join method.
Regards,
Michael. |