aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-06-24 18:01:28 +0000
committerSean Dague2008-06-24 18:01:28 +0000
commitc0a083ad38743ac5fb09e9c3a42ba17a75b42447 (patch)
tree6944121107019159800c580a77db5b5ed35d4494
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-c0a083ad38743ac5fb09e9c3a42ba17a75b42447.zip
opensim-SC_OLD-c0a083ad38743ac5fb09e9c3a42ba17a75b42447.tar.gz
opensim-SC_OLD-c0a083ad38743ac5fb09e9c3a42ba17a75b42447.tar.bz2
opensim-SC_OLD-c0a083ad38743ac5fb09e9c3a42ba17a75b42447.tar.xz
based on positive feedback on performance of making keys fixed length
for assets, make all the indexed columns in the inventory fixed length via migration.
-rw-r--r--OpenSim/Data/MySQL/Resources/002_InventoryStore.sql31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
new file mode 100644
index 0000000..c161a68
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
@@ -0,0 +1,31 @@
1BEGIN;
2
3ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
4ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
5ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
6ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
7ALTER TABLE inventoryfolders add agentID char(36) default NULL;
8ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
9UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
10ALTER TABLE inventoryfolders drop folderIDold;
11ALTER TABLE inventoryfolders drop agentIDold;
12ALTER TABLE inventoryfolders drop parentFolderIDold;
13ALTER TABLE inventoryfolders add constraint primary key(folderID);
14ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
15ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
16
17ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
18ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
19ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
20ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
21ALTER TABLE inventoryitems add avatarID char(36) default NULL;
22ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
23UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
24ALTER TABLE inventoryitems drop inventoryIDold;
25ALTER TABLE inventoryitems drop avatarIDold;
26ALTER TABLE inventoryitems drop parentFolderIDold;
27ALTER TABLE inventoryitems add constraint primary key(inventoryID);
28ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
29ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
30
31COMMIT; \ No newline at end of file