mysql and delphi 7 - transactions, speed etc.

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mmikac
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 02.06.2006, 00:43

mysql and delphi 7 - transactions, speed etc.

Post 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...
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Why using TReadOnlyQuery improves speed?
dragondz
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: 29.03.2006, 10:54
Location: Algiers, Algeria
Contact:

Post by dragondz »

is your Mysql DB under windows system or Linux?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

:) What about a harpoon? :):):):)

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