>>If someone (like you) thinks this can be improved regarding response I'd really like to learn from it, but sadly (for you) it just aint necessary. So I'm right from the start, or let's say I have a headstart.
>
>Well, I wasn't trying to improve
your program, but, in general, point to several alternatives.
>
>> ... Therefor obviously all the (index) records have to be downloaded first.
>
>Depending on the condition, and available indices. If I issue [SELECT * FROM ARTICLE WHERE ARTCODE = "123"], that is, starts with "123", VFP will get the index keys for only the records that match this criterion. Oh, of course, it will have to look at a few non-matching keys first - but because of the tree-like structure of the index, VFP doesn't load the entire index. Just as it doesn't need to look at every record if you do a SEEK. Otherwise, it would just be too slow - which it isn't.
Okay, but I think we misinterpreted eachother on part of the subject. What you imply with the above is that your selection citeria already match the
used result. So back to the teacher and the students, this was about having all the students of the teacher, and
then looking at three of the students only. And remember too, originally there wasn't an index at all, right ?
So if I interpret your lines right, you will have a Select on all what you need, and use a view for it. So in your words : only a few child records will be in the result, and I say : have your Select without the view; the view is overhead.
BTW, since FPD2.6 we can Seek the index only, maybe that helps too {g}
Since I won't have the last word, I give it to you ... Thx.