Can I create a SQL table (for example called ``commtrack_location_hierarchy_for_user``, with columns: ``domain``, ``user_id``, ``location_id``, ``parent_location_id``)? It would be updated in two cases:
1. Adding new location to CommTrack
- get id of new location's parent
- find rows with ``location_id`` = id of new location's parent in SQL table
- add appropriate rows for children locations
2. Update user's locations: here I would need to build the tree anyway, but it would be done only once (I suppose pillow would be a correct way to handle this), and for some cases like deleting all user's locations it would be much faster.

With this table I could easily do bulk loading you mentioned in the previous comment.