Michael Madigan wrote on 2012-01-17: <snip> > One thought would be to create an index of client id + status + plan but what is the best method for optimizing that given that the user can choose one, two, or three of those criteria? So I can use "Set filter to client_id+status+plan='10006100123' but how would I do it if I want client 1006 with every status and plan 123? > > What if I created 6 different indexes so I can have all the combinations of client_id, status, and plan? > > So if the user wants all the accounts where status='100', client='10006' and plan= '123' Would there be an optimized way of setting a filter? Creating a local index on the fly? > > Again, if I were writing this program from scratch, I would use SQL select statements to create a subset of the database, but I don't really have an option to re-write the program at this time. >
Michael, If there were a primary key, you'd be able to SQL select to get that, then SEEK() to it. Both the LOCATE and SET FILTER work with AND clauses which could be different indexes. Tracy Pearson PowerChurch Software _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/001501ccd560$a2aac8e0$e8005aa0$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.