select count(*) from 表1 where 列1 in (select 列1 from 表2 )
SELECT field1 FROM table1 aWHERE not exists(select 1 from FROM table2 where field1=a. field1)同时,在field1字段添加索引