Re: Django SQL Query does not stop

2011-02-03 Thread Sergiy
-Original Message- > > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] > > On Behalf Of Ivo Brodien > > Sent: 01 February 2011 23:49 > > To: django-users@googlegroups.com > > Subject: Re: Django SQL Query does not stop > > &g

Re: Django SQL Query does not stop

2011-02-03 Thread Ivo Brodien
t often runs way faster if the query is simplified. > > Regards > Chris > -Original Message- > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On > Behalf Of Ivo Brodien > Sent: 01 February 2011 23:49 > To: django-users@googlegroups.co

RE: Django SQL Query does not stop

2011-02-01 Thread Chris Matthews
runs way faster if the query is simplified. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Ivo Brodien Sent: 01 February 2011 23:49 To: django-users@googlegroups.com Subject: Re: Django SQL Query does not stop I

Re: Django SQL Query does not stop

2011-02-01 Thread Ivo Brodien
I found a solution be changing the MySQL server setting optimizer_search_depth to 3 (default 62) http://dev.mysql.com/doc/refman/5.0/en/controlling-optimizer.html http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_optimizer_search_depth My query had over 20 INNER JOINTS

Re: Django SQL Query does not stop

2011-02-01 Thread Ivo Brodien
The Change List that I am calling is a Intermediate Table if that is of any interest. Is it possible that there is some sort of circular inner joints or something? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Django SQL Query does not stop

2011-02-01 Thread Ivo Brodien
On 01.02.2011, at 16:55, Tom Evans wrote: > In the mysql shell: > > EXPLAIN SELECT ... unfortunately same problem. CPU turns to 100% and it is stuck. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django SQL Query does not stop

2011-02-01 Thread Tom Evans
On Tue, Feb 1, 2011 at 3:53 PM, Ivo Brodien wrote: > When I am in admin and I access of a certain model, Django calls mysql with > an Query which increases mysql CPU load to 99% and it never returns. > > If I copy the the SQL Query right into mysql the same thing happens, so it

Django SQL Query does not stop

2011-02-01 Thread Ivo Brodien
When I am in admin and I access of a certain model, Django calls mysql with an Query which increases mysql CPU load to 99% and it never returns. If I copy the the SQL Query right into mysql the same thing happens, so it is actually kind of a mysql problem, but since Django created the query, I