Unidac + Firebird insert very strange slowly
Posted: Tue 03 Jan 2012 17:39
Hello...
I'am using D2010 + UniDac 4.02 + Firebird on Win7 64 Bit
Insert into a FB DB is strange slowly. Very slowly.
As I see it a first... I thought solution is easy. I have to use Transaction and commit (normally way to make FB fast).
Now I use:
MyConnection.StartTransaction;
MyQuery1.SQL.Text:='select * from '+tablename;
MyQuery1.Open;
while not ....eof.... do begin
MyQuery1.Insert;
MyQuery1.Post;
end;
MyConnection.Commit;
My Problem is: With StartTransaction and Commit it's slowly too.
As I feel: Some is wrong. I looks that MyQuery1 make a commit after each post, becouse there is no speed difference.
What I do wrong ?
Hmmmm: I miss a flag like: MyQuery1.AutoCommit:=false to make sure
that post make no commit hissself.
...Joerg
www.JRichmann.de
I'am using D2010 + UniDac 4.02 + Firebird on Win7 64 Bit
Insert into a FB DB is strange slowly. Very slowly.
As I see it a first... I thought solution is easy. I have to use Transaction and commit (normally way to make FB fast).
Now I use:
MyConnection.StartTransaction;
MyQuery1.SQL.Text:='select * from '+tablename;
MyQuery1.Open;
while not ....eof.... do begin
MyQuery1.Insert;
MyQuery1.Post;
end;
MyConnection.Commit;
My Problem is: With StartTransaction and Commit it's slowly too.
As I feel: Some is wrong. I looks that MyQuery1 make a commit after each post, becouse there is no speed difference.
What I do wrong ?
Hmmmm: I miss a flag like: MyQuery1.AutoCommit:=false to make sure
that post make no commit hissself.
...Joerg
www.JRichmann.de