Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set filter to
Message
 
 
To
11/12/2001 21:42:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00593053
Message ID:
00593057
Views:
24
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>I have a table containing around 200,000 record.
>On a form I have a text box that calls a SET FILTER command on the last name.
>
>SET FILTER TO ALLTRIM(UPPER(LNAME)) = ALLT(UPPER(THISFORM.txtBox.Value))
>
>The performance in some cases is very slow and ideas???
>
>Thanks

Couple problems:
1) Filters don't work with form's properties. You should use
   lcFilter = 'upper(lName)=['+ALLT(UPPER(THISFORM.txtBox.Value))+']'
   set filter to &lcFilter

I assume, you have index on upper(lName) and not alltrim(upper(lName)). You should not use alltrim function in indexes (You can use it in combination with padr). Using this expression it would be optimizable.
After setting filter you should move record pointer. E.g. locate after set filter command

2) Filters are slow in general. You may want to check SET KEY command in Help and P-Views.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform