www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit d3b3cf1176eb2adfba6e9d48cffdad759b30d79c
parent 5420a6de4b8a4a5997f259601dc5dc8f78344b45
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  3 Sep 2009 05:19:04 +0000

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


Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 4++++
Muserdata.sql | 3++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -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(); } diff --git a/userdata.sql b/userdata.sql @@ -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 (