Running an item-age browse against a database with a reasonable
number of entries in asset.copy is dog-slow without an index
like this.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18842
dcc99617-32d9-48b4-a31d-
7c20da2025e4
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0465'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0466'); -- dbs
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
CREATE INDEX cp_avail_cn_idx ON asset.copy (call_number);
CREATE INDEX cp_creator_idx ON asset.copy ( creator );
CREATE INDEX cp_editor_idx ON asset.copy ( editor );
+CREATE INDEX cp_create_date ON asset.copy (create_date);
CREATE RULE protect_copy_delete AS ON DELETE TO asset.copy DO INSTEAD UPDATE asset.copy SET deleted = TRUE WHERE OLD.id = asset.copy.id;
CREATE TABLE asset.opac_visible_copies (
--- /dev/null
+
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0466'); -- dbs
+
+CREATE INDEX cp_create_date ON asset.copy (create_date);
+
+COMMIT;