dlamotte / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

TaggedItems.objects.get_by_model(Model, 'few tags') results in OperationalError: too many SQL variables (SQLite) #187

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In my setup, there's 5000 instances of Model, each one tagged with 5-9 tags
picked randomly from 10 available tags.

When get_by_model is executed with just two tags, the resulting query
passes too many Model PKs as a set for the IN clause of
TaggedItemManager.get_intersection_by_model.

Also, the result returned by get_intersection_by_model is
queryset.filter(pk__in=object_ids), which doesn't seem to be the most
optimal queryset that could be returned. I don't know if it's possible to
achieve anything more optimal with the current stable version of Django's
O/R Mapper.

Original issue reported on code.google.com by marcin.seredynski on 19 Feb 2009 at 9:25

GoogleCodeExporter commented 8 years ago
This issue seems to be a duplicate of
http://code.google.com/p/django-tagging/issues/detail?id=167 (working patch 
attached
in #167)

Original comment by marcin.seredynski on 19 Feb 2009 at 9:40