[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [metrics-db/master] Fix relay-search.html performance problems.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Fri, 15 Oct 2010 13:31:12 +0200
Subject: Fix relay-search.html performance problems.
Commit: 5c4e49a525b1e1c91118f032aec873ef69d2a0ed
When improving relay searches for very broad searches in 2f0b785 in
metrics-web, we added a condition to the WHERE clause but didn't update
the indexes in db/tordir.sql. Doing this now.
---
db/tordir.sql | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/db/tordir.sql b/db/tordir.sql
index 6be310b..35d190e 100644
--- a/db/tordir.sql
+++ b/db/tordir.sql
@@ -102,10 +102,13 @@ CREATE TABLE vote (
);
-- Create the various indexes we need for searching relays
-CREATE INDEX statusentry_address ON statusentry (address);
+CREATE INDEX statusentry_validafter_address
+ ON statusentry (validafter, address);
CREATE INDEX statusentry_descriptor ON statusentry (descriptor);
-CREATE INDEX statusentry_fingerprint ON statusentry (fingerprint);
-CREATE INDEX statusentry_nickname_lower ON statusentry (LOWER(nickname));
+CREATE INDEX statusentry_validafter_fingerprint
+ ON statusentry (validafter, fingerprint);
+CREATE INDEX statusentry_validafter_nickname
+ ON statusentry (validafter, LOWER(nickname));
CREATE INDEX statusentry_validafter ON statusentry (validafter);
-- And create an index that we use for precalculating statistics
--
1.7.1