diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 6ef5506af..f334be1f1 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -30,6 +30,7 @@ - fix: Users now have permission to add comments - fix: Username for comment poster is now shown correctly - fix: Slideshow now works + - added: Database index on userSession.expires field to speed up workflows 7.5.7 - fixed: HttpProxy mixes original site's content encoding with WebGUI's diff --git a/docs/upgrades/upgrade_7.5.7-7.5.8.pl b/docs/upgrades/upgrade_7.5.7-7.5.8.pl index 67c00fd6d..dbb49c6f4 100644 --- a/docs/upgrades/upgrade_7.5.7-7.5.8.pl +++ b/docs/upgrades/upgrade_7.5.7-7.5.8.pl @@ -26,6 +26,8 @@ my $session = start(); # this line required removeOldGalleryColumns( $session ); moveColumnsToGalleryFile( $session ); moveCommentsToGalleryFile( $session ); +clearRSSCache($session); +addUserSessionExpiresIndex($session); finish($session); # this line required @@ -37,6 +39,16 @@ finish($session); # this line required # # and here's our code #} +#------------------------------------------------- +sub addUserSessionExpiresIndex { + my $session = shift; + print "\tAdding index to userSession expires column..." unless $quiet; + $session->db->write( + "ALTER TABLE `userSession` ADD INDEX `expires` (`expires`)" + ); + print " Done.\n" unless $quiet; +} + #------------------------------------------------- sub clearRSSCache { my $session = shift;