Nested Set Model Maintenance
I am currently developing a comment system for a website that I am working on. I did a lot of research and decided to use the nested set model to store my comments. I have created procedures to add and delete comments to keep the left and right values correct.
My question is regarding maintenance of the left and right values. I am wonder开发者_如何学Pythoning about gaps and the effect they might have over time regarding performance and/or integrity. I know that gaps are going to end up in the datasets, but I am not sure if this is an issue. I haven't seen any information regarding maintenance.
Should I create a nightly procedure to sync all left and right values to remove the gaps, or should I not worry?
I would leave it as is and not worry.
http://en.wikipedia.org/wiki/Nested_set_model
if it doesn't break anything and it doesn't even create a performance issue it's a non issue.
精彩评论