开发过程中遇到一个问题,查询远程数据库中存在,而本地库不存在的数据,远程数据库不在物理局域网内,通过虚拟网络组成局域网,并建立dblink;
procedure中的sql语句:
1、select * from test_remote@db_link a where a.id not in (select b.id from test_local b);2、select * from test_remote@db_link a where not exists (select 1 from test_local b where b.id = a.id);我想问,在这种网络情况中,上面两条sql那个语句执行效率高一点、占用资源相对少一点?因为这两sql语句执行比较频繁!求帮助!