Commit e749c564 authored by Leigh Stoller's avatar Leigh Stoller

Add key to apt_instance_history to speed up some queries.

parent 0af2a08d
......@@ -403,7 +403,8 @@ CREATE TABLE `apt_instance_history` (
KEY `creator` (`creator`),
KEY `creator_idx` (`creator_idx`),
KEY `pid_idx` (`pid_idx`),
KEY `servername` (`uuid`,`servername`(32))
KEY `servername` (`uuid`,`servername`(32)),
KEY `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("apt_instance_history", "slice_uuid")) {
DBQueryFatal("ALTER TABLE apt_instance_history add " .
" KEY `slice_uuid` (`slice_uuid`)");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment