Commit 7f654a1f authored by Leigh Stoller's avatar Leigh Stoller

Add a couple KEY slots to the testbed_stats table to make the

showstats page way way faster.
parent 312f6259
...@@ -3609,7 +3609,9 @@ CREATE TABLE `testbed_stats` ( ...@@ -3609,7 +3609,9 @@ CREATE TABLE `testbed_stats` (
`log_session` int(10) unsigned default NULL, `log_session` int(10) unsigned default NULL,
PRIMARY KEY (`idx`), PRIMARY KEY (`idx`),
KEY `rsrcidx` (`rsrcidx`), KEY `rsrcidx` (`rsrcidx`),
KEY `exptidx` (`exptidx`) KEY `exptidx` (`exptidx`),
KEY `uid_idx` (`uid_idx`),
KEY `idxdate` (`end_time`,`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --
......
#
# Add extenal references slots to nodes table, as for geni.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("testbed_stats", "uid_idx")) {
print " *** Updating indexes ... please be patient.\n";
DBQueryFatal("ALTER TABLE testbed_stats " .
"ADD KEY `uid_idx` (`uid_idx`)");
}
if (!DBKeyExists("testbed_stats", "idxdate")) {
print " *** Updating indexes ... please be patient.\n";
DBQueryFatal("ALTER TABLE testbed_stats " .
"ADD KEY `idxdate` (`end_time`,`idx`)");
}
return 0;
}
1;
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