Hello, I am having an issue with my msyqld process responding to a query after a moderate period of inactivity. I'll issue a simple query such as "Person.objects.filter(name__icontains='Dan')", which would map to about 5000 entries in a table of roughly 200,000 rows, and see the mysqld process stall at 100% cpu load for upwards of 10 seconds.
I understand that this is not a tiny query, and it's not moving a tiny amount of information around. Also, I gather that to properly evaluate a query like name__icontains, the database server will likely need to touch each row in the table. HOWEVER: the same query, issued a short time after the first, will take roughly .2 seconds. I suspected that this may be because the information is cached, so instead I ran a smiliar query: "Person.objects.filter(name__icontains='James')", which also ran in ~.2 seconds. (PS, this time includes the evaluation of the QuerySet) The "puzzling" part of this is that in an attempt to profile the function which is performing this action, I added two calls to time.time(), one as the very first line of the function, and one as the very last, just before a render_to_response call. One would assume that since time.time() is a very straightforward and low-overhead method of retrieving the system time, that this would be very accurate, but nay. The initial, very slow, query, in reality taking 10+ seconds, was profiled at roughly 2 seconds. ?????!?!??!?!??! Please, help. I have scoured the documentation and this forum, but haven't found a solution. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

