[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Accessing random rows from LMDB



Thanks everyone for your help.

I am working on the below technique....

Make a random permutation of the integers [1..number of records]. Walk the DB with mdb_cursor_get:MDB_<FIRST/NEXT>, associate each record with an ID from the permutation.  Or something like that.

-
Regards,
Sravan


On Tue, Feb 10, 2015 at 3:12 PM, Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> wrote:
I wrote:
(...) Otherwise, maybe build a
named database with {key = record ID, data = "" key}.

Whoops, I meant provided the other data is also in named
database(s).  Database names are inserted as keys in the
database with name=NULL, which is why NULL database and
named database should not be mixed.