How to implement high performance tree view in SQL Server 2005

后端 未结 5 1206
遥遥无期
遥遥无期 2021-02-01 00:04

What is the best way to build the table that will represent the tree? I want to implement a select ,insert ,update and delete that will work well with big data. The select for e

5条回答
  •  死守一世寂寞
    2021-02-01 00:19

    Check out Joe Celko's book on trees and hierarchies for multiple ways to tackle the hierarchy problem. The model that you choose will depend on how you weight lookups vs. updates vs. complexity. You can make the lookups pretty fast (especially for getting all children in a node) using the adjacency list model, but updates to the tree are slower.

提交回复
热议问题