That's the problem, however, the operator may only have 10 items in a dataset and it looks like it will take quite a while to create that index.
________________________________ From: Kurt Wendt <kurtwe...@waitex.com> To: profox@leafe.com Sent: Tuesday, January 17, 2012 4:34 PM Subject: RE: Design question for optimizing subset of data for editing. Yeah Michael - I think a SET FILTER is one of the Slowest methods you could use. Unless you can based the Filter on an Index - and have it Rushmore optimized. However - I see no reason why you can't do as you suggested - making a Local Index - or more specifally, a Temporary Filtered Index. Even though it will take more time up front - once the Index is created - then it should be fast enough! -K- -----Original Message----- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Michael Madigan Sent: Tuesday, January 17, 2012 4:21 PM To: profoxt...@leafe.com Subject: Design question for optimizing subset of data for editing. We've just converted an old FPW 2.5 program to VFP 9.0. The program uses a form that modifies the main database. I am not using a SQL statement to generate a subset of accounts to work on, i am directly using the database using an "edit" button to lock the record I want to work on. We currently allow the user to select a subset of the data by using filters and indexes. Right now a user can select accounts to work on by client and by status, so they can say "give me all the accounts with client 10006 and status 100. To increase performance, each status has an associated index, like "index on status tag status 100 for status='100'. The client wants to now allow the user to select accounts by client, status, and now plan#. The question is, what is the best way to select that data without running a SQL select? The current method of selecting tags and filters is now too slow. 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. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text[excessive quoting removed by server] _______________________________________________ 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/1326837052.29323.yahoomail...@web125602.mail.ne1.yahoo.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.