Malcolm Tredinnick wrote:
> I would also just mention that the simplistic approach (having parent
> field) doesn't perform that badly for small structures. For example, I
> can construct the whole tree for the tag hierarchy in my blog in only a
> few microseconds. For small (say, a few dozen) datasets, the naïve
> approach is possibly a good start, just to get something working.

BTW the main disadvantage of parent field is considered to be the need 
to make make a separate SQL request for each parent to get its children. 
When I was implementing it for hierarchical comments I've used a single 
SELECT to get all the records and then was dealing with references in 
Python list. This is hardly more complex but is faster (unless you try 
to work with huge sets). Or am I missing something?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to