Fix entire autocomplete speed problem with a single missing index...

This commit is contained in:
Dan Stillman 2009-09-03 05:19:04 +00:00
parent 5420a6de4b
commit d3b3cf1176
2 changed files with 6 additions and 1 deletions

View file

@ -2447,6 +2447,10 @@ Zotero.Schema = new function(){
Zotero.DB.query("UPDATE itemAttachments SET storageModTime=NULL WHERE storageModTime<0");
}
if (i==62) {
Zotero.DB.query("CREATE INDEX IF NOT EXISTS itemData_fieldID ON itemData(fieldID)");
}
Zotero.wait();
}

View file

@ -1,4 +1,4 @@
-- 61
-- 62
-- This file creates tables containing user-specific data for new users --
-- any changes made here must be mirrored in transition steps in schema.js::_migrateSchema()
@ -46,6 +46,7 @@ CREATE TABLE itemData (
FOREIGN KEY (fieldID) REFERENCES fields(fieldID),
FOREIGN KEY (valueID) REFERENCES itemDataValues(valueID)
);
CREATE INDEX itemData_fieldID ON itemData(fieldID);
-- Note data for note and attachment items
CREATE TABLE itemNotes (