Clearing FilterSQL causes performance slowdown

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

Clearing FilterSQL causes performance slowdown

Post by luis_augusto » Sat 22 Oct 2005 20:16

when I clear the FilterSQL property, SDAC performs a
'Select * from table' sentence.
This can be painfull on large tables.
Is there a way to clear this variable without get this sentence performed?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 27 Oct 2005 06:29

Try to close dataset first, before clearing FilterSQL.

luis_augusto
Posts: 43
Joined: Fri 14 Oct 2005 13:45

Post by luis_augusto » Thu 27 Oct 2005 11:57

But then I will have to reopen it, which will cause the same select again.
The reason why I am asking this is the following:

First, I have to use filtersql to retrieve a certain amount of data.
Later, in the code, I have to perform a locate upon the same table, to retrieve a record that does not belong to the set of data I retrieved before.
All this is inside an iteration.
So, I have:

Repeat
1. Select * from Table where (which is the Filtersql = ) ...and perform some data processing
2. Select * From Table (which is the unnecessary and time expensive Filtersql='')
3. Select * From Table where Key = x (which is the locate)
until

In the situation above, if I do not clear the filtersql property, The step 3 will be:
3. Select * From Table where Key = x and (which may or may not find the record)

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 02 Nov 2005 07:32

In last SDAC build (3.55.1.20) we have fixed some problems with FilterSQL. Please check this build. If the problem persists then send us (sdac*crlab*com) complete small sample

Post Reply