Re: LIMIT 21 on primary key lookups

2014-09-14 Thread Alex French
Okay, after looking through the source code and documentation it seems that django uses the limit for primary key lookups as a cautionary measure and also to support the MultipleObjectsReturned exception in case something goes wrong. -- You received this message because you are subscribed to

Re: LIMIT 21 on primary key lookups

2014-09-14 Thread Alex French
I realize that's how it's supposed to work, but this happens regardless of whether or not results are printed. If you use postgres with the tutorial project and look at the query log, you can see the limit clause applied to primary key lookups. -- You received this message because you are

LIMIT 21 on primary key lookups

2014-09-13 Thread Alex French
I'm using Django 1.7 and I noticed something odd in my postgres query logs. Almost every query has a "LIMIT 21" clause, including queries of the type "Thing.objects.get(pk=#)", which could only ever return one row. This behavior seems odd to me, but so far I haven't seen it come up in a place