sqlite_orm
sqlite_orm copied to clipboard
Speed, IWHat I am doing wrong
This is on Linux Ubuntu 20.xx 4 cores (Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz bogomips : 5799.7) 192 inserts / second looks slow. How can I accelerate this. I would need around 4K/sec.
` auto storage = make_storage("name.db", ExperimetInfoTbl::mkt() ); storage.sync_schema(); ExperimetInfoTbl t; t.experiment_id=1; t.machine="ggg"; t.material="mmm"; t.number=66; t.part=4; t.sensor=0; t.used=1; t.success=false; time_t cct = time(0) + 10; while(::time(0) < cct) { t.experiment_id++; storage.insert(t); } std::cout << t.experiment_id<< "\n";
shell
linux$ ./dbtest 1930 # in 10 seconds therefore 193 inserts /second, this looks slow. `
hi. It is not related to sqlite_orm, it is related to SQLite itself. So don't expect you'll get the best help here for sure. But let me try to help: add storage.begin_transaction() right before while and storage.commit() right after while
@marriusco did it work?
closing due to inactivity