diff options
author | Sean Dague | 2008-07-03 19:41:01 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-03 19:41:01 +0000 |
commit | a9b3c2582a5a31464c0ab94fe88494fd75b4db29 (patch) | |
tree | a5ef2af14f49831beca83c934864360ae63ced86 /OpenSim/Data | |
parent | migrate the myisam mysql regions to innodb (diff) | |
download | opensim-SC_OLD-a9b3c2582a5a31464c0ab94fe88494fd75b4db29.zip opensim-SC_OLD-a9b3c2582a5a31464c0ab94fe88494fd75b4db29.tar.gz opensim-SC_OLD-a9b3c2582a5a31464c0ab94fe88494fd75b4db29.tar.bz2 opensim-SC_OLD-a9b3c2582a5a31464c0ab94fe88494fd75b4db29.tar.xz |
add 3 migrations, 1 each for prims, primshapes, and primitems
to move all their UUID stores from varchar(255) -> char(36). Based
on past evidence, this should help with performance.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/007_RegionStore.sql | 25 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/008_RegionStore.sql | 9 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/009_RegionStore.sql | 31 |
3 files changed, 65 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql b/OpenSim/Data/MySQL/Resources/007_RegionStore.sql new file mode 100644 index 0000000..404d248 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/007_RegionStore.sql | |||
@@ -0,0 +1,25 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims change UUID UUIDold varchar(255); | ||
4 | ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255); | ||
5 | ALTER TABLE prims change CreatorID CreatorIDold varchar(255); | ||
6 | ALTER TABLE prims change OwnerID OwnerIDold varchar(255); | ||
7 | ALTER TABLE prims change GroupID GroupIDold varchar(255); | ||
8 | ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255); | ||
9 | ALTER TABLE prims add UUID char(36); | ||
10 | ALTER TABLE prims add RegionUUID char(36); | ||
11 | ALTER TABLE prims add CreatorID char(36); | ||
12 | ALTER TABLE prims add OwnerID char(36); | ||
13 | ALTER TABLE prims add GroupID char(36); | ||
14 | ALTER TABLE prims add LastOwnerID char(36); | ||
15 | UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold; | ||
16 | ALTER TABLE prims drop UUIDold; | ||
17 | ALTER TABLE prims drop RegionUUIDold; | ||
18 | ALTER TABLE prims drop CreatorIDold; | ||
19 | ALTER TABLE prims drop OwnerIDold; | ||
20 | ALTER TABLE prims drop GroupIDold; | ||
21 | ALTER TABLE prims drop LastOwnerIDold; | ||
22 | ALTER TABLE prims add constraint primary key(UUID); | ||
23 | ALTER TABLE prims add index prims_regionuuid(RegionUUID); | ||
24 | |||
25 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql b/OpenSim/Data/MySQL/Resources/008_RegionStore.sql new file mode 100644 index 0000000..7bc61c0 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/008_RegionStore.sql | |||
@@ -0,0 +1,9 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primshapes change UUID UUIDold varchar(255); | ||
4 | ALTER TABLE primshapes add UUID char(36); | ||
5 | UPDATE primshapes set UUID = UUIDold; | ||
6 | ALTER TABLE primshapes drop UUIDold; | ||
7 | ALTER TABLE primshapes add constraint primary key(UUID); | ||
8 | |||
9 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql b/OpenSim/Data/MySQL/Resources/009_RegionStore.sql new file mode 100644 index 0000000..284732a --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/009_RegionStore.sql | |||
@@ -0,0 +1,31 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primitems change itemID itemIDold varchar(255); | ||
4 | ALTER TABLE primitems change primID primIDold varchar(255); | ||
5 | ALTER TABLE primitems change assetID assetIDold varchar(255); | ||
6 | ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255); | ||
7 | ALTER TABLE primitems change creatorID creatorIDold varchar(255); | ||
8 | ALTER TABLE primitems change ownerID ownerIDold varchar(255); | ||
9 | ALTER TABLE primitems change groupID groupIDold varchar(255); | ||
10 | ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255); | ||
11 | ALTER TABLE primitems add itemID char(36); | ||
12 | ALTER TABLE primitems add primID char(36); | ||
13 | ALTER TABLE primitems add assetID char(36); | ||
14 | ALTER TABLE primitems add parentFolderID char(36); | ||
15 | ALTER TABLE primitems add creatorID char(36); | ||
16 | ALTER TABLE primitems add ownerID char(36); | ||
17 | ALTER TABLE primitems add groupID char(36); | ||
18 | ALTER TABLE primitems add lastOwnerID char(36); | ||
19 | UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold; | ||
20 | ALTER TABLE primitems drop itemIDold; | ||
21 | ALTER TABLE primitems drop primIDold; | ||
22 | ALTER TABLE primitems drop assetIDold; | ||
23 | ALTER TABLE primitems drop parentFolderIDold; | ||
24 | ALTER TABLE primitems drop creatorIDold; | ||
25 | ALTER TABLE primitems drop ownerIDold; | ||
26 | ALTER TABLE primitems drop groupIDold; | ||
27 | ALTER TABLE primitems drop lastOwnerIDold; | ||
28 | ALTER TABLE primitems add constraint primary key(itemID); | ||
29 | ALTER TABLE primitems add index primitems_primid(primID); | ||
30 | |||
31 | COMMIT; \ No newline at end of file | ||