]> git.xonotic.org Git - xonotic/xonstat.git/commit
Huge performance boost for the DB queries on the home page.
authorAnt Zucaro <azucaro@gmail.com>
Tue, 20 Mar 2012 11:07:23 +0000 (07:07 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Tue, 20 Mar 2012 11:07:23 +0000 (07:07 -0400)
commit1be3e4d12ce96880ee8691d5b3bcf6365175b3ac
treea0b896e941b34dc4b9a8985f7bda6b0192fa6c18
parent687eed1cc849b4a9795f44bc751da919f9e067e0
Huge performance boost for the DB queries on the home page.

The queries on the home page weren't bound by dates (which are indexed) or limited by the number of rows returned (despite the tables being a fixed size there). Adding these two filters on each of the queries makes the home page fly. The dates are done w/ a BETWEEN clause, while the limit on the queries is done w/ a normal LIMIT statement. The result takes the page from 3.5s average load time to about 400ms. :D :D :D
xonstat/views/main.py