﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
4375	generic view archive_year is querying all objects, unexplained.	Steven Wagner <stevenwagner@…>	Jacob	"Here is my urls.py , pretty much identical to djangobook.

{{{
info_dict = {
    'queryset': Report.objects.all(),
    'date_field': 'date',
    'make_object_list': 'False',
}

urlpatterns = patterns('django.views.generic.date_based',
   (r'^report/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')),
   (r'^report/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$',                  'archive_day',   info_dict),
   (r'^report/(?P<year>\d{4})/(?P<month>[a-z]{3})/$',                                   'archive_month', info_dict),
   (r'^report/(?P<year>\d{4})/$',                                                       'archive_year',  info_dict),
   (r'^report/?$',                                                                     'archive_index', info_dict),
)
}}}


Here are the queries I see in my sql log, as the python process climbs in memory usage and 100cpu until django server crashes.
{{{
SELECT CAST(DATE_FORMAT(`reports`.`date`, '%Y-%m-01 00:00:00') AS DATETIME)  
FROM `reports` 
WHERE `reports`.`date` IS NOT NULL AND (`reports`.`date` <= '2007-05-23' AND `reports`.`date` BETWEEN '2007-01-01 00:00:00' AND '2007-12-31 23:59:59.999999') 
GROUP BY 1 ORDER BY 1 ASC

SELECT `reports`.`id`,`... FROM `reports
}}}

My reports table is huge, but the datebased generic views shouldnt be loading the entire reporting table. 
Especially not with make_object_list set to false."		closed	Generic views	0.96		wontfix			Unreviewed	0	0	0	0	0	0
