I just thought because I did surgery on my own neck once I'd be able
to go to the guilde of surgeons.
On Feb 16, 7:12 pm, Luke Plant wrote:
> On Wed, 2011-02-16 at 11:36 -0800, Matteius wrote:
> > OK got it down to 15 using another def queryset in the Assignment
> > admin.TabularInline. I'm stil
On Wed, 2011-02-16 at 11:36 -0800, Matteius wrote:
> OK got it down to 15 using another def queryset in the Assignment
> admin.TabularInline. I'm still not sure why it is executing the
> following query 5 times, but it is (half the total time of the total
> queries):
We are very definitely into d
OK got it down to 15 using another def queryset in the Assignment
admin.TabularInline. I'm still not sure why it is executing the
following query 5 times, but it is (half the total time of the total
queries):
0.56SELECT
EXPLAIN
Toggle Stacktrace
SELECT `auth_user`.`id`, `auth_user`.`usernam
OK this suggestion has gotten me part of the way and certainly
improved the state of the admin. However, I'm still getting linear
dependence in the admin now in the case of inline editing. I have
Assignments, Instructor and Mentors all with a ForeignKey to Course.
Well for the example of a new C
Thanks, you got me going on the right path.
On Feb 14, 12:31 pm, Jacob Kaplan-Moss wrote:
> On Mon, Feb 14, 2011 at 11:41 AM, Matteius wrote:
> > No the hits are with the initial page load before any AJAX gets
> > called, my AJAX code is 2 DB hits. I am not claiming select_related
> > should be
On Mon, Feb 14, 2011 at 11:41 AM, Matteius wrote:
> No the hits are with the initial page load before any AJAX gets
> called, my AJAX code is 2 DB hits. I am not claiming select_related
> should be default, but somehow it should be an option for the admin
> change form.
Have you tried supplying
No the hits are with the initial page load before any AJAX gets
called, my AJAX code is 2 DB hits. I am not claiming select_related
should be default, but somehow it should be an option for the admin
change form. Here is why, here is an example of the worst cases:
You'll see two different Foreign
Though it's a little hard to tell from your post, this sounds more
like it's definitely a case where your code needs improvement. From
what I understand, the database hits are coming from your custom AJAX,
not from the admin's default behavior. Also, you already know the
solution: use select_relate
I have a very small test database on my test development virtualbox
environment and so while I've been adding in custom AJAX for dynamic
ForeignKey filters (in the case of Enrollment's Assignment list) I
noticed that because I'm using the Django Debug Toolbar. Well on
these pages with only ~28 Enr