高手请进:关于视图[内包含派生表]索引的问题!
Dong 2005-10-30 12:44:34 视图比较复杂,自定义了很多的函数,函数表,当然了,包含有派生表的问题[另外其它也搞了很多的派生表]!!没有办法,这是公司要我做的任务,任务是加快对视图的查询速度,我在在试图里建立不了索引![表5--8万记录,一般5万]
问题1:如何在一个包含有派生表的视图里加索引??难道死路一条??
问题2:如果不可以在一个带有派生表的试图里加索引,那么该怎样才可以加快试图的查询能力??
------------------------------------------------------------------
试图 SQL
select
。。。。。太长影响看问题,删除省烈
from
((select * from GetSpringboard() group by ID,Springboard)[A],
(select * from GetCHboard() group by ID,CHboard)[B]
where A.ID=B.ID)[A],
(select * from GetDestination() group by ID,Destination)[B],
(select * from GetRDate())[C],
(select * from GetTDate())[D],
(* from provide)[E],
(select * from GetPrice())[G]
where A.ID = B.ID
and A.ID = C.ID
and A.ID = D.ID
and A.ID = E.ID
and A.ID = G.ID
--------------------------------------------------------------------
问题3:(select * from GetRDate())[C],这应该是属于派生表了吧?
问题4:((select * from GetSpringboard() group by ID,Springboard)[A],
(select * from GetCHboard() group by ID,CHboard)[B]
where A.ID=B.ID)[A],这个肯定是派生表了吧??