CLEAR >create cursor x1 ( i1 i, c1 c(10) ) >for i = 1 to 10000 > insert into x1 values ( i, transform( i ) ) >endfor >index on i1 tag i1 > >create cursor x2 ( i1 i, c1 c(10) ) >for i = 1 to 10000 step 2 > insert into x2 values ( i, transform( i ) ) >endfor >index on i1 tag i1 > >n1 = 0 >n2 = 0 > >select *, f1() ; > from x1 where exists ( select i1 from x2 WHERE f2() AND x2.i1 = x1.i1 ) ; > into cursor x3 > >? n1, n2 > >n1 = 0 >n2 = 0 > >select *, f1() ; > from x1 where i1 in ( select f3(i1) from x2 ) ; > into cursor x3 > >? n1, n2 > >function f1() >n1 = n1 + 1 >return > >function f2() >n2 = n2 + 1 >RETURN > >function f3(tnVal) >n2 = n2 + 1 >RETURN tnVal >However, this test only shows how many records where processed by query and subquery. I doesn't take in account other factors. If you run speed tests you'll find out that in VFP IN subquery is faster in most cases than EXISTS.