Commit 98136cee authored by Leigh Stoller's avatar Leigh Stoller

Add a key to the users table to speed up image listing, it was taking

thirty seconds!
parent ced53bd4
......@@ -5427,7 +5427,8 @@ CREATE TABLE `users` (
KEY `unix_uid` (`unix_uid`),
KEY `status` (`status`),
KEY `uid_uuid` (`uid_uuid`),
KEY `uid` (`uid`)
KEY `uid` (`uid`),
KEY `nonlocal_id` (`nonlocal_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBKeyExists("users", "nonlocal_id")) {
DBQueryFatal("ALTER TABLE users add " .
" KEY `nonlocal_id` (`nonlocal_id`)");
}
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