select a
use tab1
index on key to indexfilename1
select b
use tab2
index on key to indexfilename2
set relation to key into tab1 in tab2
replace fieldname with tab1.fieldname in tab2 for found("tab1")
select a
use tab1
index on key to indexfilename1
select b
use tab2
index on key to indexfilename2
set relation to key into tab1 in tab2
replace fieldname with tab1.fieldname in tab2 for found("tab1")