www

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

commit 35f1720b086675f1fc8cf9a3eab190015d030a71
parent 8bed3d44ed3e1980153aa51944773fc191e99604
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  1 May 2013 18:00:28 -0400

Add missing index to creatorData table

It's amazing what you can find when you actually have a profiler.

Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 4++++
Mresource/schema/userdata.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 @@ -3329,6 +3329,10 @@ Zotero.Schema = new function(){ Zotero.DB.query("CREATE TABLE syncedSettings (\n setting TEXT NOT NULL,\n libraryID INT NOT NULL,\n value NOT NULL,\n version INT NOT NULL DEFAULT 0,\n synced INT NOT NULL DEFAULT 0,\n PRIMARY KEY (setting, libraryID)\n)"); Zotero.DB.query("INSERT OR IGNORE INTO syncObjectTypes VALUES (7, 'setting')"); } + + if (i == 78) { + Zotero.DB.query("CREATE INDEX creatorData_name ON creatorData(lastName, firstName)"); + } } _updateDBVersion('userdata2', toVersion); diff --git a/resource/schema/userdata.sql b/resource/schema/userdata.sql @@ -1,4 +1,4 @@ --- 77 +-- 78 -- Copyright (c) 2009 Center for History and New Media -- George Mason University, Fairfax, Virginia, USA @@ -162,6 +162,7 @@ CREATE TABLE creatorData ( fieldMode INT, birthYear INT ); +CREATE INDEX creatorData_name ON creatorData(lastName, firstName); CREATE TABLE itemCreators ( itemID INT,