>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 //:^)