Commit 16edec33 authored by Leigh Stoller's avatar Leigh Stoller

Add a key to manifest_history table, queries were taking two seconds.

parent 7b5eb1bb
......@@ -342,7 +342,8 @@ CREATE TABLE `manifest_history` (
`manifest` mediumtext,
PRIMARY KEY (`idx`),
INDEX `aggregate_urn` (`aggregate_urn`(255)),
KEY `created` (`created`)
KEY `created` (`created`),
KEY `aggregate_uuid` (`aggregate_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `ticket_history`;
......
#
#
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
if (! DBKeyExists("manifest_history", "aggregate_uuid")) {
DBQueryFatal("alter table manifest_history add ".
" KEY `aggregate_uuid` (`aggregate_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