improve speed (paradox)

improve speed (paradox)

Post by Santy Conc » Sun, 12 Sep 2004 18:28:52


My application needs to open a paradox table (38000 records) on application
start, make some checks and close it again.
For example:

if Table1.FindField('NEW_FIELD') = nil then
if Table1.IsEmpty = false then

If table is too big, this code takes some seconds to run.
I have tried to Filter and then Open it:
Table1.Filter := filter;
Table1.Filtered := True;

I have tried to disablecontrols - enablecontrols.
I have tried to SetRange, but SetRange needs the table to be opened.

Any ideas?

improve speed (paradox)

Post by Markku Nev » Sun, 12 Sep 2004 21:22:42

You did not tell what kind of DB operation you are actually trying to

Record count of 38.000 is peanuts, if you have any indexed field there,
and you can seek the data by using that index. Paradox always requires
the Primary Index, and then you can add Secondary indexes as much as
you need.

With indexed searches, that is using FindKey for instance, you should
always get a couple of seconds response time with local databases.

If you use SetRange with indexed field, you should get the table
open with that selected dataset in some seconds. Filter is not as effective,
if you do not know what you are doing.

If there are a bunch of Master/Detail connections with this table that you
are opening, they can also cause some slowness when they get open.

Markku Nevalainen


improve speed (paradox)

Post by Santy Conc » Mon, 13 Sep 2004 00:12:11

> You did not tell what kind of DB operation you are actually trying to

All I wanted to do is "open" the table.
I noticed that I have a third party component to sum a table field assigned
to the table, and that was the reason of the slowness.
I delete the component and now the table opens in a second or less.

Thanks for your attention