Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
24349147
Commit
24349147
authored
Aug 12, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add index to apt_instance_history to speed up slow query.
parent
05cdd21e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
sql/database-create.sql
sql/database-create.sql
+2
-1
sql/updates/4/649
sql/updates/4/649
+19
-0
No files found.
sql/database-create.sql
View file @
24349147
...
...
@@ -371,7 +371,8 @@ CREATE TABLE `apt_instance_history` (
KEY
`profile_id`
(
`profile_id`
),
KEY
`creator`
(
`creator`
),
KEY
`creator_idx`
(
`creator_idx`
),
KEY
`pid_idx`
(
`pid_idx`
)
KEY
`pid_idx`
(
`pid_idx`
),
KEY
`servername`
(
`uuid`
,
`servername`
(
32
))
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
;
--
...
...
sql/updates/4/649
0 → 100644
View file @
24349147
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("apt_instance_history", "servername")) {
DBQueryFatal("ALTER TABLE apt_instance_history " .
"ADD KEY `servername` (`uuid`,`servername`(32))");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment