Fix performance issues with new PackageDepends lookups

We do a lookup by DepName in the package details view, but I made the
silly mistake of forgetting this index addition in the upgrade steps.

Lukas: Fix numbering in "UPGRADING".

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Dan McGee 2011-06-22 10:04:10 -05:00 committed by Lukas Fleischer
parent 0e9f8c0ff5
commit c0e6aabeb1
2 changed files with 7 additions and 4 deletions

View file

@ -9,13 +9,15 @@ each AUR upgrade by running `make install` in the "po/" directory.
2. Remove the "NewPkgNotify" column from the "Users" table: 2. Remove the "NewPkgNotify" column from the "Users" table:
----
ALTER TABLE Users DROP COLUMN NewPkgNotify; ALTER TABLE Users DROP COLUMN NewPkgNotify;
----
3. Rename "web/lib/config.inc" to "web/lib/config.inc.php". 3. Fix up issues with depends performance on large dataset.
4. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php". ALTER TABLE PackageDepends ADD INDEX (DepName);
4. Rename "web/lib/config.inc" to "web/lib/config.inc.php".
5. Merge "web/lib/config.inc.php.proto" with "web/lib/config.inc.php".
From 1.8.1 to 1.8.2 From 1.8.1 to 1.8.2
------------------- -------------------

View file

@ -123,6 +123,7 @@ CREATE TABLE PackageDepends (
DepName VARCHAR(64) NOT NULL, DepName VARCHAR(64) NOT NULL,
DepCondition VARCHAR(20), DepCondition VARCHAR(20),
INDEX (PackageID), INDEX (PackageID),
INDEX (DepName),
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE
) ENGINE = InnoDB; ) ENGINE = InnoDB;