物化路径模式 VS Hierarchyid

发布于 2024-08-30 03:22:16 字数 92 浏览 3 评论 0原文

我正在阅读 SQL Server 2008 圣经,它说物化路径模式比 Hierarchyid 快得多。这是真的吗?我怎样才能使hierarchyid具有相同或更好的性能。

I am reading the SQL server 2008 bible and it says the materialized path pattern is significantly faster then the hierarchyid. Is this really true? How can I make the hierarchyid have equal or better performance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烏雲後面有陽光 2024-09-06 03:22:16

本章介绍了设计和查询层次结构的三种方法:邻接对、物化路径和 HierarchyID。这是同一问题的三种解决方案,所以是的,比较这三种方法是非常有意义的。事实上,物化路径是最快的,但邻接对可以解决更多类型的层次结构问题。 HierarchyID 很笨拙,难以查询,而且,如果您遵循 MSFT 的建议,它只存储相对位置,而不存储键,因此它的稳健性较差。

The chapter explains three methods for designing and querying hierarchies: Adjacency Pairs, Materialized Path, and HierarchyID. These are three solutions to the same problem so yes, it makes perfect sense to compare these three methods. The truth is that Materialized path is the fastest but Adjacency Pairs can solve more types of hierarchy problems. HierarchyID is clumsy, difficult to query, and, if you follow MSFT’s recommendation, it only stores the relative position, not the key, so it’s less robust.

夜声 2024-09-06 03:22:16

您的意思是物化路径与嵌套集还是?物化路径模式可以采用层次数据类型。比较模式与数据类型的速度是没有意义的。

Do you mean materialized path vs. nested sets or ? A materialized path pattern can employ a hiearchyid datatype. It doesn't make sense to compare the speed of a pattern vs a datatype.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文