I want to create a filter of reputes for some period. A query is:
After that i ran
But this solution is very slow. Нow can I optimize the query?
Maybe there are other ways (without using reputes table)? General task is to get users who have been reputed from one date to another.
I've changed an
But the query has not working faster. Where the mistake?
I've tried this one. I've run
For getting indexes. After I've run
into dbshell, but got an error
I also tried
How I understood the trouble in
I've tried to create an other query
But I had the same result. How can I optimizing the query (a calculation of sum of the reputes values)?
OK. I've gotten a generated query. In the query the Django platform has pasted GROUP BY by all columns in the query (there are about 15 columns). I think the problem in GROUP BY statement. What must I do for fix this trouble?
The question has been closed for the following reason "The question is answered" by expert 16 Nov '11, 11:56
Just add some indexes on your database tables and things should work much faster.
answered 07 Nov '11, 13:17
Hernani Cerq... ♦♦
I don't know, is it normal or not but my solution is working
It's fast and doesn't depend on size of database. If I have mistakes, please show them to me.
answered 10 Nov '11, 09:10