I need some ideas on how to accomplish a multiple filter that will work fast. I have four separate browses in a window with different filters working from the same database ...and the filter will change dynamically based on user input also.
SET FILTER TO UPPER(jobdate1->status) != "COMPLETE" .AND. jobdate1->scheddate = dDate1 .AND. jobdate1->presscode = cPressCode
Obviously FILTER is SLoooowwwww. It can take upwards of 4-5 seconds to paint the screen or change the view.
Are there any techniques to accomplish this that will be faster?
I was experimenting with a combination of FILTER and SET SCOPE, but couldn't even get the SET SCOPE beyond a compiler error ("parse error at SCOPE".... SET SCOPE TO dDate1...indexed on date).
Ideas are appreciated! Thanks.... Greg
Filter/Scope dilemna
- Greg Gammon
- Posts: 105
- Joined: Fri Jun 09, 2006 3:27 pm
- Location: Bryan, Texas
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Greg Gammon
- Posts: 105
- Joined: Fri Jun 09, 2006 3:27 pm
- Location: Bryan, Texas
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
- Greg Gammon
- Posts: 105
- Joined: Fri Jun 09, 2006 3:27 pm
- Location: Bryan, Texas
Yes, that is essentially what I am doing. The problem with FILTER though is it must evaluate every record of the database so it is much slower than SCOPE...but SCOPE will allow for only one key evaluation...and I need three.
What I am contemplating is copying to a temp database based on two keys which and using SCOPE for the third key...but then when a record is changed, I have to go back and change it in the main database (goto recno() having recorded the recno in the temp database)...just not very elegant...searching for a better way.
Thanks for the help!
G
What I am contemplating is copying to a temp database based on two keys which and using SCOPE for the third key...but then when a record is changed, I have to go back and change it in the main database (goto recno() having recorded the recno in the temp database)...just not very elegant...searching for a better way.
Thanks for the help!
G
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA