You are not logged in.
Pages: 1
I must add about 250000 record on a SQLite table. My code works but it's very slow.
MyRecord := TSQLMyTable.Create;
try
MyRecord .AAA:= StringToUTF8('test');
MyRecord .BBB := StringToUTF8('test');
MyRecord .CCC := StringToUTF8('test');
if Database.Add(TAFRecord, True) > 0 then
begin
end;
finally
TAFRecord.Free;
end;
I'm working on local computer (no client/server) and I use "Database: TSQLRestServerDB;" (I cannot use "Database: TSQLRest;" because I need EngineExecuteAll to run "VACUUM" sql).
Can you help me?
Last edited by array81 (2012-11-01 22:32:14)
Offline
This is a known restriction of SQLite3, due to its ACID nature.
1) use a transaction (and a batch process)
2) set DB.Synchronous := smOff
Offline
OK, I have read the article.
But:
1) TSQLRestServerDB doesn't have a Synchronous property, where I find it?
2) I need use TSQLRestClientDB e TSQLRestServerDB also if I use a local database?
Offline
OK.
1. Is there a way to use SQL (for example call "VACUUM") with TSQLRest? Or si it right use TSQLRestServerDB.
2. "use a transaction (and a batch process)" but for this I need of TSQLRestClientDB and then of TSQLRestServerDB, right?
Offline
1. You should better run such low-level commands on the Server side, using a dedicated interface-based service for instance, or a method-based service command.
2. You can use transactions on both sides.
Batch mode is designed for the client side.
Offline
Pages: 1