diff options
author | Yorhel <git@yorhel.nl> | 2012-01-07 20:07:09 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2012-01-07 20:08:56 +0100 |
commit | f5f3d4d5265d172b7489e58ccd92a02bcc99c157 (patch) | |
tree | 5d9891be52a8614fb78a5ab2d0447b2e653ba0b6 /util | |
parent | 71f1e958ff2932dad0b9ea691b8e9bc149bad925 (diff) |
SQL: Added two indices
This brings the average page generation time for VN pages down from
~170ms to ~90ms (when measured over a period of a few hours).
I haven't put this in an update script, if you want to take advantage of
these indices make sure to manually add them yourself.
Diffstat (limited to 'util')
-rw-r--r-- | util/sql/schema.sql | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql index 40af8975..913d51ef 100644 --- a/util/sql/schema.sql +++ b/util/sql/schema.sql @@ -538,7 +538,9 @@ ALTER TABLE wlists ADD FOREIGN KEY (vid) REFERENCES vn CREATE INDEX affiliate_links_rid ON affiliate_links (rid) WHERE NOT hidden; +CREATE INDEX releases_producers_rid ON releases_producers (rid); CREATE INDEX releases_vn_vid ON releases_vn (vid); CREATE INDEX tags_vn_date ON tags_vn (date); +CREATE INDEX tags_vn_vid ON tags_vn (vid); CREATE UNIQUE INDEX chars_vns_pkey ON chars_vns (cid, vid, COALESCE(rid, 0)); |