有人会问为什么要这样?因为我要建立的视图很复杂。
比如:
create view V
as
select a.name.,b.amt from
(select name from a_table where id like :Variable0 ) a,
(select amt from b_table where subno = :Variable1 ) b
where a.id=b.id and b.tag>3
因为数据量大,所以在子查询限定条件能节省运行时间,但是条件又是不定的。
有个办法查询前每次REPLACE VIEW,你觉得可行吗?
比如:
create view V
as
select a.name.,b.amt from
(select name from a_table where id like :Variable0 ) a,
(select amt from b_table where subno = :Variable1 ) b
where a.id=b.id and b.tag>3
因为数据量大,所以在子查询限定条件能节省运行时间,但是条件又是不定的。
有个办法查询前每次REPLACE VIEW,你觉得可行吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货