I have a program that constructs a database from a flat data file. The database includes two tables. One table has a single record for each person. Another table has numerous records for each person. When I construct the latter table, I index it on a key shared with the first table and a second key to make sure the records are in ascending order for each person.
In various programs I have written to work with these two tables, before I set a relation between the first table and the second, I issue INDEX instructions so the SET RELATION instruction will work. I only issue an INDEX instruction on the one common key between the two tables, though. Is there any reason I should be concerned that the records in the second table might get out of ascending order if I don't issue the INDEX instruction including the second key when I index the second table? I can't imagine why VFP would change the order of the records (out of ascending order) when an INDEX instruction is issued. Would it be a "best practice" to always issue INDEX instructions on the second table with both keys specified the way they are when the table is first created?
My programs work fine, so indexing with the second key doesn't appear to be necessary.