Does Tokyo Cabinet support in-memory B+ trees? If so, how do I use them? Because in some web articles (for example here and here), such usage is reported but I can't find any document describing how to do it. Thanks.
Asked
Active
Viewed 770 times
2
-
Ah yes, the mythical "some article I found" article. – Marc B Apr 09 '12 at 04:42
-
@MarcB, I modify my question. – Arpssss Apr 09 '12 at 04:48
2 Answers
1
The documentation describes tcadbopen(TCADB *adb, const char *name) as follows:
`name' specifies the name of the database. If it is "*", the database will be an on-memory hash database. If it is "+", the database will be an on-memory tree database.
So, the name "+" does what you want.

Alexander Ushakov
- 5,139
- 3
- 27
- 50

Sven
- 496
- 4
- 9
-
I try that: means HDB hdb = new HDB(); if(!hdb.open("+", HDB.OWRITER | HDB.OCREAT)). But, it creates a DB named +. – Arpssss Apr 09 '12 at 09:27
-
The magic for + and * is only available via the abstract interface (-> tcadbopen). – Sven Apr 09 '12 at 09:30
-
No, the abstract interface is available at the C level, see section "The Abstract Database API" in the documentation. If you are using a binding for another language, the binding could be incomplete. So please consider completing it. – Sven Apr 09 '12 at 10:14
1
You will also find a good overview of the possibilities of Tokyo Tyrant here: http://korrespondence.blogspot.fr/2009/09/tokyo-tyrant-tuning-parameters.html

lizzie
- 1,506
- 1
- 18
- 31