Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My solution to that: store representations of trees as simple paths like "/trunk/branch/leaf1/", "/trunk/branch/leaf2/", etc. And just rely on the application layer to parse it all out into a friendly IU. When you want a specific branch, just do "select * from table where signature like '/trunk/branch/%'


In my experience, that is obscenely slow..

Not practical whatsoever.


not if you cache your data structures intelligently... probably not a good solution for something like PHP or Rails where you lose your application state across requests

Or do you mean that using "like" is slow? i would think that it would not be as long as that column is indexed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: