Page 1 of 1

Very slow speed when adding a record

Posted: 05.02.2008, 17:21
by Guest
In my application I have to insert a record into a remote table. I use a TzConnection and a TzQuery in Delphi 5. After connected the TzConnection I use this code:

Code: Select all

ZQuery.SQL.Text:='SELECT * FROM table';
ZQuery.Open;
ZQuery.Insert;
ZQuery.FieldByName('id').AsInteger:=Id;
ZQuery.FieldByName('data').AsDateTime:=data;
TBlobField(ZQuery.FieldByName('image')).LoadFromStream(FS);
ZQuery.Post;
ZQuery.Close;
The FS is a tFileStream of about 6 kbytes.
The software does this operation many times and everything works fine, but the speed remain around 1 kbyte/sec.
The server and the client are connected to Internet with ADSL (I tried to upload one file in the server via FTP, the speed was around 30 kbyte/sec). On the server there's a MySQL v. 5.0.22,
the version of ZeosLib is 6.6.2-RC.

Why the speed is so low? Where I am wrong?

Thank you

Posted: 06.02.2008, 12:02
by Guest
Please excuse me,
but now I think that the problem is not in the Zeos Lib. I tried to do the same operations with a PHP script instead of with my software, and the result is the same. Always the speed remains around 1 kbyte/sec. Maybe the MySQL is not configured properly, or other.

Thank you.