Y
yaoian
Unregistered / Unconfirmed
GUEST, unregistred user!
interbase数据库,从一个view 里select出大概10个字段,而其中5个会写在group by里
如:
select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 from view_aa group by a1,a5,a6,a8,a9,a10
而view是join了5个表的,因为那5个表经常要更新,所以否决了用建表来代替建view的可能
就在执行select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 from view_aa group by a1,a5,a6,a8,a9,a10
这句时就差不多用了50秒了,更甭提但我我把一些条件加进去时(什么 where ,haing啊)
简直就惨不忍睹,忘大侠帮帮忙,怎么进行索引改善啊
如:
select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 from view_aa group by a1,a5,a6,a8,a9,a10
而view是join了5个表的,因为那5个表经常要更新,所以否决了用建表来代替建view的可能
就在执行select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 from view_aa group by a1,a5,a6,a8,a9,a10
这句时就差不多用了50秒了,更甭提但我我把一些条件加进去时(什么 where ,haing啊)
简直就惨不忍睹,忘大侠帮帮忙,怎么进行索引改善啊