>This should be really fast, as the WHERE should be evaluated before the JOIN. But it isn't (or doesn't seem to be).
Actually, the WHERE is really evaluated after the JOIN (at least in VFP7). There does appear, however, to be some Rushmore "magic" used that will attempt to filter the cursors going into the join with optimizable expressions in the WHERE clause. Maybe this changed in 8, but in your example here, "WHERE .f." isn't giving RUSHMORE anything to work with anyway.
In your real case, are you filtering on the primary or outer cursor?
>
>Now, in VFP7, this takes at least 0.00 seconds. (The real query takes .27 seconds)
>
>VFP8, at least .57 seconds. (the real query takes > 4 seconds)
>
>Any thoughts?