本文介绍了是否允许非线性递归?它是否利用指数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我想知道是否 与RECURSIVE MaryAncestor(anc,desc)AS ((选择父级为anc,子级为desc FROM ParentOf WHERE desc = " Mary") UNION (SELECT A1.anc,A2.desc 来自MaryAncestor A1 ,MaryAncestor A2 WHERE A1.desc = A2.anc)) 来自MaryAncestor的SELECT anc 在DB2中允许第一名。如果允许,它可以在从Mary导航路径时利用连接索引 。节点到祖先根? I wonder if WITH RECURSIVE MaryAncestor(anc,desc) AS( (SELECT parent as anc, child as desc FROM ParentOf WHERE desc ="Mary")UNION(SELECT A1.anc, A2.descFROM MaryAncestor A1, MaryAncestor A2WHERE A1.desc = A2.anc) )SELECT anc FROM MaryAncestor is allowed in DB2 in the first place. If allowed, can it leverage join indexwhen navigating path from "Mary" node to ancestor root? 推荐答案 好​​问题。我记得Oracle新闻组中的一个帖子 得出的结论是标准版本功能更强大,但这几乎不是基于数学证明的 。 另请注意,O10g已经对连接进行了更改。 有一件事我可以自信地说: 重写另一个是另一个是一般都是非常重要的。 当你试图取消订单和等级时,事情变得越来越有趣了。> b $ b信息来自递归。 鉴于我从来没有用连接写任何东西我不能评论 连接失误。 干杯 Serge - Serge Rielau DB2 SQL编译器开发 IBM多伦多实验室 Good question. I remember a thread in the Oracle newsgroup thatconcluded that the standard version was more powerful, but that washardly based on a mathematical proof.Also note that O10g has made changes to connect by. There is one thing I can say with confidence:Rewriting one as the other is in general non trivial. Things are getting interesting when you try to tease order and levelinformation out of "recursive with".Given that I never wrote anything using connect by I can''t comment whereconnect by stumbles. CheersSerge --Serge RielauDB2 SQL Compiler DevelopmentIBM Toronto Lab 这篇关于是否允许非线性递归?它是否利用指数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-18 00:53