[Seed7-users] Fwd: Re: Greetings, new in the list
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Fernando R. <fer...@gm...> - 2016-05-27 07:16:06
|
I reply to the list, sorry for the duplicate email. Thank you very much for your response. > Hi, thank you for your interest in Seed7. > I am pleased to hear such a positive feedback. > Regarding your question. I am not an SQLite expert, but years ago I > did some > performance measurements with SQLite (not with Seed7 but with C++). > With the > measurements I found out that SQLite is much faster when it just works in > memory without a file. Opening an in memory SQLite database in Seed7 > is done with: > openDatabase(DB_SQLITE, "", "", "") Ok > The C interface of SQLite (and maybe also Tcl) uses the name > ":memory:" to open > an in memory database. So maybe your Tcl example works in memory while the > Seed7 example does not. The example was working in file :) > With short googling about SQLite autocommit I found this explanation: > https://www.sqlite.org/c3ref/get_autocommit.html > It seems that autocommit is on until you are inside a transaktion. > Transaktions are explained here: > http://www.tutorialspoint.com/sqlite/sqlite_transactions.htm > The commit function in the Seed7 driver for SQLite is currently a noop, so > commit(db) > will currently not work for a SQLite database but the following should > work: > execute(db, "BEGIN"); > execute(db, "COMMIT"); Yes, it works. From 5 seconds to 0.101 seconds. That's what I expected. Thanks. > Different databases have different behavior regarding commit and > transaktions. > So maybe Tcl always starts a transaktion without telling you. This > could be a way > to emulate that autocommit is switched off. If that works the Seed7 > interface > could do that also. I general I want to provide the same behavior for > all databases. > So it depends how the other databases handle autocommit and transactions. > I hope that I could help you. > Regards > Thomas Mertes > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > > > _______________________________________________ > Seed7-users mailing list > See...@li... > https://lists.sourceforge.net/lists/listinfo/seed7-users Cheers |