utility_belt.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:SQLCell 作者: tmthyjames 项目源码 文件源码
def build_node(id_, node, xPos):
        _node = {
            'name': id_,
            'nodetype': node.get('Plan', node).get('Node Type'),
            'starttime': node.get('Plan', node).get('Actual Startup Time'),
            'endtime': node.get('Plan', node).get('Actual Total Time'),
            'subplan': node.get('Plan', node).get('Subplan Name'),
            'display': str(node.get('Plan', node).get('Join Filter', 
                                                  node.get('Filter', 
                                                           node.get('Index Cond', 
                                                                    node.get('Hash Cond', 
                                                                             node.get('One-Time Filter',
                                                                                     node.get('Recheck Cond',
                                                                                             node.get('Group Key')
                                                                                             )
                                                                                     )
                                                                            )
                                                                   )
                                                          )
                                                 ) or '') + (' using ' 
                                            + str(node.get('Index Name', 
                                                           node.get('Relation Name',
                                                                   node.get('Schema')))) + ' ' + str(node.get('Alias')or'')
                                                if node.get('Index Name', 
                                                            node.get('Relation Name',
                                                                    node.get('Schema'))) 
                                                else ''),
            'rows': node.get('Plan', node).get('Plan Rows'),
            'xPos': xPos
        }
        return _node
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号