Better Performance - Single TMyConnection or Many?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ACS2000
Posts: 31
Joined: Thu 18 May 2006 11:10

Better Performance - Single TMyConnection or Many?

Post by ACS2000 » Thu 27 Mar 2008 10:05

Hi,

I'm using Delphi Win32 and use DataModules for most of my major forms.
I'm wondering whether to use a single TMyConnection that all the DataModules access or to put a connection in each one. I'm trying to make each Form/DataModule to be as independent as possible, but I'm worried about memory and network load.

Your advice would be appreciated.

Alan

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 28 Mar 2008 07:50

If you use connection with the same parameters for each DataModule, it's better to use one TMyConnection. Otherwise all depends on your application specificity.
Also you can use connection pooling. You can find detailed information about it in the "Using connection pooling" topic of MyDAC help.

ACS2000
Posts: 31
Joined: Thu 18 May 2006 11:10

Post by ACS2000 » Tue 01 Apr 2008 14:27

Thanks will look into the pooling

Post Reply