"Live Data Windows Mode" in UniDAC

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: "Live Data Windows Mode" in UniDAC

Post by azyk » Sat 22 Dec 2018 08:53

Ivan_Carpio89 wrote: Thu 20 Dec 2018 17:59 2.- The duration increased, going from 1 minute to 7 minutes. This has its explanation since now it consults the fields of the table for every 25 rows.
SmartFetch mode does not give duration advantages when fetching data sequentially. SmartFetch mode provides advantages when editing tables with a large number of records.

To go to a particular record, it is not necessary to sequentially read all the records before/after it. You can use the TUniTable.MoveBy method. For example, if you want to go to the 500000th record, use the following code:

Code: Select all

  UniTable.Active:= True;
  UniTable.MoveBy(500000);
For more information about MoveBy in the Embarcadero documentation: http://docwiki.embarcadero.com/Librarie ... Set.MoveBy


Ivan_Carpio89 wrote: Thu 20 Dec 2018 17:59 1.- If the table is in constant change, that is, is being affected by INSERT's, UPDATE's and DELETE's, have you considered that the WHERE was as follows ?:
SmartFetch mode uses a universal mechanism that suits all Uni providers. Therefore, SmartFetch mode does not use the specific features of various DBMSs. Besides, it does not use SQL Server OFFSET-FETCH Clause.


Ivan_Carpio89 wrote: Thu 20 Dec 2018 17:59 1.- Get all the rows of the table, only by consulting the fields of the primary key.
2.- In each Next the fields of the first 25 rows are obtained, and so on for every 25 rows traveled.
This is a specificity implementation of the SmartFetch mode. It allows to use the SmartFetch mode for all Uni providers.

TUniTable fetches data by blocks. The number of records in the block is taken from the FetchRows property: https://www.devart.com/unidac/docs/deva ... chrows.htm . For example, if you set FetchRows=42, then the data will be fetched by 42 records.

Post Reply