2008层次结构数据类型性能

2008层次结构数据类型性能

本文介绍了SQL Server 2008层次结构数据类型性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与使用Joe Celko在此处描述的层次结构实现相比,SQL Server 2008的Hierarchy数据类型的性能如何: http://www.intelligententerprise.com/001020/celko.jhtml ?

How does SQL Server 2008's Hierarchy data type perform compared to using the hierarchy implementation described by Joe Celko here: http://www.intelligententerprise.com/001020/celko.jhtml?

过去,我一直使用Celko的方法取得了不错的效果-但是,除非它比Microsoft在SQL Server 2008中提供的更好,否则我不想在新项目中实现它.

I've used Celko's method in the past with great results - but don't want to implement it for a new project unless it's better than what Microsoft has provided in SQL Server 2008.

推荐答案

到目前为止,我只找到了一篇关于该主题的有趣的文章. HierarchyId比任何自制的自引用表解决方案都快得多:

So far, I've only found a single reasonably interesting article on the topic. HierarchyId is much faster than any self-made self-referencing table solution:

http://www.sqlservercentral.com/articles/SQL+服务器+ 2008/62204/

我隐约记得在其他地方看到了另一个比较(但现在再也找不到了),得出了相似的结论.最好使用HierarchyId建立层次结构有点麻烦,但是查询性能却很出色.

I vaguely remember seeing another comparison elsewhere (but can't find it anymore) which came to similar conclusions; using HierarchyId to build up the hierarchy is a bit cumbersome at best, but query performance is stellar.

马克

这篇关于SQL Server 2008层次结构数据类型性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 05:17