bo2bo2 wrote:
i have a self joined table what is the best way to rebuild the tree up
like
1 Country null
2 City 1
3 Neighborhood 2
i need to generate this string tracing the tree up
Neighborhood > City > Country
with minimum Queries as it's going to be intensely used across the website
Can't you just cache this information (you're on the neighborhood page, then move on to the city page, and because you cached the neighborhood value in the session for example, you don't have to read that again)? Also, you just store strings in a single table? Because a city isn't a country...