How can I compare performance of BerkeleyDB and MySQL with 100 milion records
2 comments
What do you want to compare Read performance or write performance? with how many concurrent connections? What MySQL engine you will use Transaction (InnoDB) or Memory engine?
Believe you need to link the appropriate shared library -- -ldb or something like that, see https://stackoverflow.com/questions/2628227/berkeley-db-cant...
I have installed on my machine (Ubuntu 18.04 and BerkeleyDB 18.1)
But when I run hello world:
``` vv@vv-ThinkPad-T450:~/test$ gcc hello2.cpp -o hello2 -I /usr/local/berkeleydb/include/ /tmp/ccoElaRL.o: In function `main': hello2.cpp:(.text+0x3d): undefined reference to `Db::Db(DbEnv, unsigned int)' hello2.cpp:(.text+0x7c): undefined reference to `Db::open(DbTxn, char const, char const, DBTYPE, unsigned int, int)' hello2.cpp:(.text+0x8f): undefined reference to `Db::~Db()' hello2.cpp:(.text+0xc3): undefined reference to `Db::~Db()' hello2.cpp:(.text+0xd6): undefined reference to `__cxa_begin_catch' hello2.cpp:(.text+0xe2): undefined reference to `__cxa_end_catch' hello2.cpp:(.text+0xec): undefined reference to `__cxa_begin_catch' hello2.cpp:(.text+0xf8): undefined reference to `__cxa_end_catch' /tmp/ccoElaRL.o: In function `__static_initialization_and_destruction_0(int, int)': hello2.cpp:(.text+0x12e): undefined reference to `std::ios_base::Init::Init()' hello2.cpp:(.text+0x143): undefined reference to `std::ios_base::Init::~Init()' /tmp/ccoElaRL.o:(.data.rel.local.DW.ref._ZTI11DbException[DW.ref._ZTI11DbException]+0x0): undefined reference to `typeinfo for DbException' /tmp/ccoElaRL.o:(.data.rel.local.DW.ref._ZTISt9exception[DW.ref._ZTISt9exception]+0x0): undefined reference to `typeinfo for std::exception' /tmp/ccoElaRL.o:(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0' collect2: error: ld returned 1 exit status
```
Folder code:
/home/test/hello.cpp
and I run by command: gcc hello.cpp -o hello -I /usr/local/berkeleydb/include/
Now, I dont know how to finish my home work. Pls help me.