Page 1 of 1

IBDAC vs IBX is slow (Fix included)

Posted: Thu 27 Jan 2011 10:42
by BlueMoon
Hi,

I am using a firebird db with IBDAC on a server via TCP. The db has 20000 records. With IBDAC a sql select and a jump to the last record has a duration of 67 seconds. With IBX (included with delphi) it only takes 4 seconds.

I am using TIBCQuery, TIBCConnection, TDataSource, TDBGrid. Just drop the components from the component palette to the form. No settings are changed (except dbname and serverIP)

Code: Select all

  DB.Connect;
  IBCQuery1.SQL.Text := 'select * from mytable;
  IBCQuery1.Prepare;
  IBCQuery1.Open; 
If I set both CacheArray := false; and CacheBlobs := false;
then IBDAC has the same speed. Why? Is this a bug?

If I set only DeferredBlobRead to True then IBDAC has the same speed too. What does DeferredBlobRead do?

Which solution is better? CacheArray+CacheBlobs or DeferredBlobRead? What are the pros and cons of each solution?

Thanks!

Posted: Fri 28 Jan 2011 09:59
by AndreyZ
Hello,

The CacheArray, CacheBlobs, DeferredBlobRead, and DeferredArrayRead options manage the way of working with BLOB and array content. If the CacheBlobs property is set to True, then local memory buffer is allocated to hold a copy of the BLOB content. If the DeferredBlobRead property is set to True, all BLOB values are only fetched when they are explicitly requested. To get the highest performance you should set DeferredBlobRead to True and CacheBlobs to True. In this case only requested portions of data will be fetched from the server. It's the same with the CacheArray and DeferredArrayRead options. For more information please read the IBDAC documentation.

Posted: Fri 28 Jan 2011 11:53
by BlueMoon
OK, thank you very much!