database: Add an index on the hostname column
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2014 14:19:36 +0000 (14:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Sep 2014 14:19:36 +0000 (14:19 +0000)
src/ddns/database.py

index 1e613c9..5d4ffc9 100644 (file)
@@ -61,6 +61,8 @@ class DDNSDatabase(object):
                                        k TEXT NOT NULL,
                                        v TEXT NOT NULL
                                );
+
+                               CREATE INDEX idx_updates_hostname ON updates(hostname);
                        """)
                        c.execute("INSERT INTO settings(k, v) VALUES(?, ?)", ("version", "1"))