Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter very slow
Message
From
12/08/1997 11:30:39
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00044161
Message ID:
00044239
Views:
36
>Hello,
>
>I'm using a form to browse and update a table with the
>fields: organisation, customer, ...
>
>On the form only records of one organisation should be
>displayed. The user is able to select the organisation
>with a command button. I have set a filter like this:
>organisation = '001'
>
>I have also an index on organisation to optimize the filter.
>But it is still very slow:
>
>e.g. Organisation '001' 150000 records
> Organisation '002' 250 records
>
>It seems that in the case of organisation '002' all records
>were read -> takes 70 seconds to move from the first to the
>last record.
>
>Without a filter it is quite fast.
>
>Any suggestions?
>
>Thanks in advance.
>
>Andreas
Whenever you set filter you need to...
1)Ensure that you have an index on the field you are filtering
2)set order to 0, otherwise you essentially get 2 filters fighting each other
3)if you have set deleted on, you should have an index on deleted(), something like "INDEX ON DELETED() TAG ISDELETED"

In most cases it is better to use an SQL Cursor for most filters.

Hope this helps //:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform