Should I worry about running out of HierarchyIDs?

Posted by Bruno Martinez on Stack Overflow See other posts from Stack Overflow or by Bruno Martinez
Published on 2010-05-15T14:36:38Z Indexed on 2010/05/15 14:44 UTC
Read the original article Hit count: 208

Filed under:
|
|

When you ask for a new HierarchyID between two others, the result gets progressively longer. For example, between 2/5.6 and 2/5.7 there's only 2/5.6.1 and other 4 component paths. The HierarchyID data type is limited to 800 some bytes, so you can't repeat this forever. Then again, integer types are also limited, but it isn't a problem in practice. Should I periodically defragment my table so that height doesn't grow unbounded?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about hierarchyid