Foxtable(狐表)用户栏目专家坐堂 → BOM数据展开,制造业的高手请进!


  共有24551人关注过本帖平板打印复制链接

主题:BOM数据展开,制造业的高手请进!

帅哥哟,离线,有人找我吗?
lxl
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 一级勋章
等级:MVP荣誉狐 帖子:858 积分:6071 威望:0 精华:19 注册:2008/9/1 9:13:00
  发帖心情 Post By:2010/4/18 21:17:00 [只看该作者]

以下是引用唐尸三摆手在2010-4-18 15:31:00的发言:

这样测试了一下:

dim al as string="B-WG-XJ-DG-53"
'多级反展
 Dim s As String =  " ;with cte As "  & _
    "(select * from abt00000 where childitem = '"  & al  & "'  "  & _
    "union all  "  & _
    "select a.* from abt00000 a  "  & _
    "join cte on a.childitem  = cte.parentitem) "  & _
    "select  * from cte "

output.show(s)

显示结果为:
 ;with cte As (select * from abt00000 where childitem = 'B-WG-XJ-DG-53'  union all  select a.* from abt00000 a  join cte on a.childitem  = cte.parentitem) select  * from cte
然后拷入查询管理器中:执行到2分30秒还没显示结果


可是为什么正展在瞬间就显示结果呢? 

 

 

 

[此贴子已经被作者于2010-4-18 15:34:27编辑过]


应该索引的原因。parentitem列没有加索引。
可以把abt00000  只留部分实例数据 然后备个份发给我。看到结构才能分析原因。


 回到顶部
总数 40 1 2 3 4 下一页