0

I'm in the process of converting a Paradox database application written in Delphi to use SQL Server 2008 R2. We are using the UNIDAC components from Devart to access the database/tables. However, I am finding the performance rather slow. For example, in the Paradox version it is more or less instant when it opens up a table (Using TTable) with 100,000 records, but the SQL Server (Using TUniTable) take approximately 2 seconds. Now I know this doesn't seem a lot but there are 10 TUniTable datasets which open up on form creation, all of which contain around the same number of records, so at present it is taking just under 20 seconds to open them all. Does anyone have any performance tips?

I'm using Delphi 2007

RRUZ
  • 134,889
  • 20
  • 356
  • 483
PDM
  • 503
  • 2
  • 12
  • 27
  • 5
    This has nothing to do with UniDAC. You should *never* use table-type access to a SQL database; it means that (for almost all servers), 100% of the data is transferred to the client. You should be using queries instead, and restricting the data being retrieved with a specific list of columns and a WHERE clause that reduces the number of rows. – Ken White Jan 31 '12 at 01:31

1 Answers1

2

IMHO, UniDAC TUniTable is just a wrapper of TUniQuery. TUniTable open may lead to fetching all records on SQL Server. Not sure how, but try to change SQL Server cursor type and/or location.

If it is not late, then consider to use AnyDAC and TADTable. It uses "Live Data Window" technology, which allows to open and browse through the large tables without significant delays, eg Open and Last calls will be always fast. We migrated few BDE applications to AnyDAC and Firebird, TADTable works really great.

oodesigner
  • 1,007
  • 6
  • 8
  • Ken White's warning is still valid for AnyDAC, a Query (SQL centric) will perform better than a Table (recommended mostly for Desktop database). – menjaraz Jan 31 '12 at 08:35