]> git.ipfire.org Git - oddments/ddns.git/commitdiff
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 1e613c914c2cdbeda1a27935f8a7dc68eacee8ea..5d4ffc98ff85372fda120bb84845c230b83484e8 100644 (file)
@@ -61,6 +61,8 @@ class DDNSDatabase(object):
                                        k TEXT NOT NULL,
                                        v TEXT NOT NULL
                                );
                                        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"))
 
                        """)
                        c.execute("INSERT INTO settings(k, v) VALUES(?, ?)", ("version", "1"))