diff options
author | Sean Dague | 2008-06-24 18:01:28 +0000 |
---|---|---|
committer | Sean Dague | 2008-06-24 18:01:28 +0000 |
commit | c0a083ad38743ac5fb09e9c3a42ba17a75b42447 (patch) | |
tree | 6944121107019159800c580a77db5b5ed35d4494 | |
parent | Update svn properties. (diff) | |
download | opensim-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.sql | 31 |
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 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE inventoryfolders change folderID folderIDold varchar(36); | ||
4 | ALTER TABLE inventoryfolders change agentID agentIDold varchar(36); | ||
5 | ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36); | ||
6 | ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
7 | ALTER TABLE inventoryfolders add agentID char(36) default NULL; | ||
8 | ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL; | ||
9 | UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold; | ||
10 | ALTER TABLE inventoryfolders drop folderIDold; | ||
11 | ALTER TABLE inventoryfolders drop agentIDold; | ||
12 | ALTER TABLE inventoryfolders drop parentFolderIDold; | ||
13 | ALTER TABLE inventoryfolders add constraint primary key(folderID); | ||
14 | ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID); | ||
15 | ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID); | ||
16 | |||
17 | ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36); | ||
18 | ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36); | ||
19 | ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36); | ||
20 | ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
21 | ALTER TABLE inventoryitems add avatarID char(36) default NULL; | ||
22 | ALTER TABLE inventoryitems add parentFolderID char(36) default NULL; | ||
23 | UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold; | ||
24 | ALTER TABLE inventoryitems drop inventoryIDold; | ||
25 | ALTER TABLE inventoryitems drop avatarIDold; | ||
26 | ALTER TABLE inventoryitems drop parentFolderIDold; | ||
27 | ALTER TABLE inventoryitems add constraint primary key(inventoryID); | ||
28 | ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID); | ||
29 | ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID); | ||
30 | |||
31 | COMMIT; \ No newline at end of file | ||