Page 1 of 1

mysql and delphi 7 - transactions, speed etc.

Posted: 02.06.2006, 00:47
by mmikac
I am using ZeOS in Delphi to access mySQL database remotely (located on my web/db server). It connects OK and works, but... IT IS SLOW

How can I speed it up?

Could I optimize it by disabling AutoCommit? I tried, but get exceptions when trying to commit manually in my code...

Posted: 02.06.2006, 08:16
by mdaems
First check network speed. Is connection using the mysql client equally slow or not.
Secondly : only select the data you need. Every byte has to be interpreted,cached,...
Tertio : If you only need readonly access, use a TReadOnlyQuery
Quatro : If you don't need components ('batch program') you can try to use the DBC layer immediately Information about this should be in the knowledge base.

Mark

Posted: 03.06.2006, 11:58
by zippo
Why using TReadOnlyQuery improves speed?

Posted: 03.06.2006, 15:04
by dragondz
is your Mysql DB under windows system or Linux?

Posted: 03.06.2006, 20:38
by mdaems
Zippo,

Sorry, It's just a guess, but if ZEOS is written logically (I hope, and if it's not we should change this) There's no need to check if updates to the database should be done. I also think there's less need of memory to cache updates an so on. But : I did not verify this.
Anyhow : don't use a canon to kill a fly.

Mark

Posted: 05.06.2006, 12:53
by zippo
:) What about a harpoon? :):):):)

But you planted the seed for curiosity.. I'l test it when I will have time.