I am doing some bechmarking on the performance of both the versions of the query: 1. Item.objects.filter(created_by__employees__org__in=u.employees_set.all().values_list('org')) and 2. Items.objects.extra(where=['created_by_id in (select e.user_id from myapp_employees e, myapp_organization o where e.org_id = o.id and o.id = (select o2.id from myapp_organization o2, myapp_employees e2 where e2.org_id = o2.id and e2.user_id=3 and e2.deleted=False)) '])
I am seeing #1 to be faster(when i view from DDT). Will update in the next few days or probably early next week. -V -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.