MapDB treemap.clear() takes forever

239 Views Asked by At

I have treemap in mapdb with 150K entries. Calling treemap.clear() takes minutes. How can I do this quickly? Creating new one with

db.treeMap("pageCache").create();

gives crash org.mapdb.DBException$WrongConfiguration: Named record already exists: pageCache. How can I clear collection in a reasonable time?

Thanx.

1

There are 1 best solutions below

0
KRK Owner On

try .createOrOpen() when building your treemap.