[odb-users] how to use ODB for hight performance

Herzl Shmuelian / Brilltech Int. hshmuelian at brilltech.com
Tue May 21 09:38:56 EDT 2013


I am want use ODB for save huge msg that receive from my server this  can
be above 20K msg/per sec

I try to use it but I have Performance problem, and when I try to check the
performance by simple program like below:

                 odb::mysql::database *pdb = new odb::mysql::database
("odb_test","","odb_test","127.0.0.1");
                time_t t1;
                time_t t2;
t1= time(0);
transaction t(pdb->begin());
person jane ("222", "Doe", 32);
for(unsigned int i = 0 ; i < 10000000 ; i++){
         pdb->persist (jane);
  }
                 t.comit();
t2= time(0);
cout<<"time:"t<<2-t1<<endl;

I get perfomace about 10k msg per sec.
I want imperove performance but I don't know how I can do it by ODB.
I thinks some way to do that
1) open several connection to mysql
2) send several command together
3)unsync send commnad to mysql
How I can do it
thanks Herzl.


More information about the odb-users mailing list