Are there any methods or tools to enable someone to visualise/graphically represents the b-tree that underpins an index?

The purpose would be to aid in the teaching of how indexes work to enable students to better picture what is going on under the hood.

  • Haven't ever seen such a thing. Though I imagine you could whip something up with python to produce some interesting graphics. Feb 5 '18 at 15:59
  • For an actual existing index, or just a visualisation of a generic B-tree? Feb 5 '18 at 16:23
  • For an existing index.
    – Sam Shiles
    Feb 5 '18 at 16:30
  • It's just a tree so you can probably extract the page info using DBCC IND (or sys.dm_db_database_page_allocations depending on what info is needed) as JSON then use one of the various jQuery libraries that display trees. Feb 5 '18 at 16:44
  • Probably something representing an org chart would work. E.g. jqueryscript.net/chart-graph/… Feb 5 '18 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.