Can balance tree go un balance in following condition. ( b-tree of primarykey)

  • Hi,

    Please tel me how b-tree of clustered index will look like if i have

    1,2,3,4 then there is gap 6,7,8,9 then gain there is gap 40 ,41,42,then it goes continuasly to 300.

    Q1) I want to ask the question more specificaly, it is balance tree so , will it keep the balance?

    Q2) Or having gaps in primarykey can slow the performance of search (not for the insertion or deletion becuase

    they will take their time , with that i would like to say, we are inserting id from pool so table will get greater Ids)?

    Q3) Is there any way to see the b-tree of the PK or get an idea of its structure?

    yours sincerely

  • A balanced tree is always balanced, that's part of the definition of the data structure. It cannot be unbalanced.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply