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

Re: LMDB : mdb_drop is slow

Venkat Murty wrote:
I have a lmdb environment in linux with 4K (MDB_dbi) databases. The size
of the whole lmdb file is around 500G.

foreach (MDB_dbi db in databases)
    mdb_drop (txn, db, 0);

This process takes more that 10 hours. Is it reasonable ?

Probably not a reasonable thing to do. Just delete the DB file and recreate it. mdb_drop() is only slightly faster than mdb_delete'ing each record.

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/