Add index for looking up threads by lists
authorMagnus Hagander <magnus@hagander.net>
Sun, 25 Nov 2012 16:24:44 +0000 (17:24 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 25 Nov 2012 16:24:44 +0000 (17:24 +0100)
loader/sql/schema.sql

index 8b9c1abe28c4ad383d3a43e145adc50afe54b384..99d5da2e76e0847feaca86ecc24715dc6a340f82 100644 (file)
@@ -59,6 +59,7 @@ CREATE TABLE list_threads(
    listid int NOT NULL REFERENCES lists(listid),
    CONSTRAINT pg_list_threads PRIMARY KEY (threadid, listid)
 );
+CREATE INDEX list_threads_listid_idx ON list_threads(listid);
 
 CREATE TABLE attachments(
    id serial not null primary key,