While I can't say for sure, I believe there will be some performamnce hit in VFP because you are excuting 3 distinct queries now. However, as long as the proper indexes are in place, the hit should not be that noticable to your users (as long as the # of records is manageable). Just my opinion.
As for Oracle, I can't say at all. I don't have Oracle to test whether (+) is better than NOT IN. Maybe you can post back some statistics when you get this running.
>Hi Larry,
>
>That's great. Just one more small clarification. Will there be any performance degradation using this way? Thanks
>
>>I believe the following will work in both:
>>SELECT field1, field2, mytable2.field3 FROM mytable1,mytable2 ;
>> where mytable1.field1 = mytable2.field1
>>UNION
>>SELECT field1, field2, ' ' as field3 FROM mytable1 ;
>> where mytable1.field1 not in (select mytable2.field1 from mytable2)
>
>>You have to go back to the days before we had outer joins in VFP.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao