最近工作数据库中有这样一个视图:
create or replace view vw_1 as
select t.*, v.* from table t,view v
where t.objectid=v.instanceid and v.bustype='xxxx' and v.operid=xxxx union select t1.*, 0 v.* from table t1
where t1.objectid
not in
(select v1.instanceid from view v1 where v1.bustype='xxxx' and v1.operid=xxxx ) 求问这个SQL语句的效率?查询起来有什么不良后果么?table表的数据量一般,view v是一个工作流视图.
create or replace view vw_1 as
select t.*, v.* from table t,view v
where t.objectid=v.instanceid and v.bustype='xxxx' and v.operid=xxxx union select t1.*, 0 v.* from table t1
where t1.objectid
not in
(select v1.instanceid from view v1 where v1.bustype='xxxx' and v1.operid=xxxx ) 求问这个SQL语句的效率?查询起来有什么不良后果么?table表的数据量一般,view v是一个工作流视图.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货