UniDAC dramatically slow in wireless network

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
andy_bri
Posts: 19
Joined: Fri 02 Oct 2009 12:36

UniDAC dramatically slow in wireless network

Post by andy_bri » Wed 16 Mar 2011 14:21

Some days ago I switched my local network from cable to wireless connection. And from this moment applicatons based on UniDAC connection slowed down app. 10 times! I know, that wireless network is slower. However I tested loading 3000 records (just SELECT * FROM CUSTOMER) from local server to workstation:
- TIbDatabase and TIbDataset - below 4 seconds,
- IbExpert also loads all table records in 4 seconds,
- TUniConnection and TUniQuery/TUniTable - over 30 seconds.

What is wrong? Is there any special configuration of UniDAC connection required? All properties have default values: FetchAll is false, I am using standard TDbGrid, default index, no filters or master/details relations etc.

I am using:
- Delphi XE Professional,
- newest UniDAC version 3.60.0.16, just TUniConnection TUniTransaction and TUniQuery
- connection protocol: TCP/IP
- Windows Vista, Windows 7 and Windows XP,
- Firebird 2.5.

AndreyZ

Post by AndreyZ » Fri 18 Mar 2011 07:30

Hello,

While we are looking for the possibility of testing UniDAC with wireless connection, you can try the following approaches in order to investigate this problem:
1) set the FetchAll property to True;
2) set the FetchAll property to False and play with the FetchRows property;
3) test UniDAC data loading speed without using the TDBGrid component.

andy_bri
Posts: 19
Joined: Fri 02 Oct 2009 12:36

Post by andy_bri » Tue 22 Mar 2011 06:15

Thanks for advice, but FetchRows flag manipulations did not change anything. I also tested CompressBlobMode, LongStrings, disabling DbGrid, using DataEditor for viewing fetched records and other settings - no solution found.

Last days I have made many additional tests. It looks like UniDAC works very slowly also with cable connection. Are there problems for specific routers or maybe it is very slow in every network? What are your experience?

I am using typical TP-LINK Router (Model: 150M Wireless Lite N ADSL2+ Modem Router), connection via cables. Results (TCP/IP protocol):
- IbExpert fetches 3000 records from the local server in about 1 second.
- IbDatabase / IbQuery: the same.
- UniConnection / UniQuery needs about... 11 seconds.

Am I doing something wrong?

andy_bri
Posts: 19
Joined: Fri 02 Oct 2009 12:36

Post by andy_bri » Tue 22 Mar 2011 13:51

Resolved (with help from AnyDAC support team). DeferredBlobRead flag in TUniQuery options must be set to True and fetching rows runs as quick as IBExpert and IBX.

AndreyZ

Post by AndreyZ » Tue 22 Mar 2011 15:24

It is good to see that this problem was solved. If DeferredBlobRead property is set to True, all BLOB values are only fetched when they are explicitly requested. If any other questions come up, please contact us.

andy_bri
Posts: 19
Joined: Fri 02 Oct 2009 12:36

Post by andy_bri » Tue 22 Mar 2011 17:25

Ok, thank you.

maddn
Posts: 13
Joined: Wed 21 Sep 2011 12:47

Post by maddn » Wed 21 Sep 2011 14:16

Hi, I have the same problem but with MySQL. Is there a way to use something like DeferredBlobRead on MySQL?

AndreyZ

Post by AndreyZ » Fri 23 Sep 2011 09:57

Please specify the exact operation that is slow in wireless network when you are working with MySQL. Is it reading data or updating data?

maddn
Posts: 13
Joined: Wed 21 Sep 2011 12:47

Post by maddn » Mon 26 Sep 2011 08:33

Hi AndreyZ I thought I can put my question right here. If you want I can also start a new Thread.

My Problem is reading data from large Tables with Blobfields. I wonder if there is an Option to deactivate reading all the blobs. Only the blob which is selected should be transferred.

AndreyZ

Post by AndreyZ » Tue 27 Sep 2011 09:38

Unfortunately, UniDAC doesn't have options for MySQL that can prevent blob reading. The point is that if you put a blob field into the SELECT statement, MySQL will return this field anyway. The only way to make data reading faster for MySQL is to set the FetchAll property to False. In this case data will be fetched to a client computer only if it is requested.

maddn
Posts: 13
Joined: Wed 21 Sep 2011 12:47

Post by maddn » Fri 30 Sep 2011 07:30

Hi AndreyZ, thank you for your answer but now I wonder how AnyDAC does this because there my large Blob-Table opens with fetchall=true really fast.
Anyway I'll decide for UniDAC because it is much more comfortable :)

AndreyZ

Post by AndreyZ » Fri 30 Sep 2011 14:38

We will investigate the problem with blob fields. As soon as we have any results we will let you know.

tanghz
Posts: 23
Joined: Wed 17 Jan 2007 02:40

Post by tanghz » Mon 03 Oct 2011 08:11

It seems put BLOB content in another table is a safe bet for DB design. Correct me if I am wrong.

maddn
Posts: 13
Joined: Wed 21 Sep 2011 12:47

Post by maddn » Tue 04 Oct 2011 11:27

AndreyZ wrote:We will investigate the problem with blob fields. As soon as we have any results we will let you know.

Thanks for that!

tanghz wrote:It seems put BLOB content in another table is a safe bet for DB design. Correct me if I am wrong.
Thats right but the tablestructures are allready done for several years and infact we get no money for redesign :) :wink:

AndreyZ

Post by AndreyZ » Wed 05 Oct 2011 10:27

We've checked the question about blob fields. When MySQL server is used, both UniDAC and AnyDAC fetch blob data from the server, and have almost the same performance. We are interested in finding a solution for this problem, so if you have an example that demonstrates AnyDAC not fetching blob fields from the server, please send it to andreyz*devart*com. We are looking forward to receiving this sample from you.

Post Reply