Inbox can now handle millions of messages without being impossible to view

This commit is contained in:
Doug Bell 2008-07-29 16:59:10 +00:00
parent cc76e3b319
commit 26d353e7e6
3 changed files with 77 additions and 24 deletions

View file

@ -3,6 +3,8 @@
- fixed: EMS not displaying all users with a badge
- fixed: WebGUI::Search - joinClass not documented
- fixed: thingy's checkbox field
- Inbox and ?op=viewInbox can now handle millions of rows without taking 10 minutes to return
some results
7.5.18
- fixed: Collateral Image Manager broken in Firefox 3

View file

@ -29,6 +29,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
addNewInboxIndexes( $session );
finish($session); # this line required
@ -42,6 +43,24 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
# Add new indexes to the inbox to make millions of messages possible
sub addNewInboxIndexes {
my $session = shift;
print "\tAdding new indexes to inbox. This may take a while... " unless $quiet;
print "\n\t\tIndex on userId..." unless $quiet;
$session->db->write(
"CREATE INDEX pb_userId ON inbox ( userId )"
);
print "\n\t\tIndex on groupId..." unless $quiet;
$session->db->write(
"CREATE INDEX pb_groupId ON inbox ( groupId )"
);
print "\n\t\tDONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------