While doing some scaling optimization the Zeitgeist team decided to give Berkeley DB a try. But porting from SQLite to Berkeley is not easy. However thanks to the Berkeley SQL API porting one can use the SQLite queries. All we did was change the Makefile and add a new vapi (which is a straight copy of the sqlite3.vapi but with dbsql.h as a referenced header instead of sqlite3.h).
The results are not good though. But maybe its because we need to optimize the queries a bit more. Nevertheless you will find the code on freedesktop under the branchname berkeley tonight.
If you like a challenge, try to optimize the Berkeley optimization yourself, but be aware this is not for beginners and it may break you DB.
To build it make sure you get Berkeley db (on Debian and Ubuntu):
- sudo apt-get install libdb-sql-dev
- git clone git://anongit.freedesktop.org/zeitgeist/zeitgeist
- git checkout -b "testing-berkeley"
- git am --signoff < /path/to/patch
- cp /path/to/vapi /usr/share/vala/vapi/dbsql.vapi
- sh autogen.sh --prefix=/usr/ --disable-fts && make
- ZEITGEIST_DATA_PATH=/home/seif/.local/share/zeitgeist-bdb/ src/zeitgeist-daemon --replace --log-level=debug --no-datahub
you will find a generate_events.py script in the zeitgeist tools folder as well as other benchmarking scripts. Feel free to poke around.