Re: GROUP BY behavior change in Django 2.0 with annotate/extra

2018-03-12 Thread Tim Graham
I'd use git bisect to find the commit where the behavior changed in Django. That will likely yield some insight. https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#bisecting-a-regression On Friday, March 9, 2018 at 5:39:43 PM UTC-5, Michael Soderstrom wrote: > > In a

GROUP BY behavior change in Django 2.0 with annotate/extra

2018-03-09 Thread Michael Soderstrom
In a 1.11 branch I had a complex raw sql snippet added to a query set via annotate. When I updated Django to 2.0, the query set behavior changed to include the raw sql in the GROUP BY which destroyed the performance. The same behavior occurred using annotate and extra. I was able to hack aro