From cf5a674965b3d944b2747b6aeae8cfc79c26e6f4 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Mon, 29 Apr 2013 15:12:10 -0400 Subject: Update the stream_playlist table to use MyISAM InnoDB's performance is unacceptable out of the box, and there's no clean way to batch these insertions into transactions, and stuff. Benchmarks for 1000 inserts: InnoDB: 54.826 MyISAM: 0.091 InnoDB transaction: 0.159 Fixes GH #14 --- lib/class/update.class.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/class') diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 2bfcdd4d..dcaeceaf 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -337,6 +337,10 @@ class Update { $update_string = '- Drop enum for the type field in session.
'; $version[] = array('version' => '360012', 'description' => $update_string); + + $update_string = '- Update stream_playlist table to address performance issues.
'; + $version[] = array('version' => '360013', 'description' => $update_string); + return $version; } @@ -1505,12 +1509,21 @@ class Update { } /** - * update_360012() + * update_360012 * * Drop the enum on session.type */ public static function update_360012() { return Dba::write('ALTER TABLE `session` CHANGE `type` `type` VARCHAR(16) DEFAULT NULL'); } + + /** + * update_360013 + * + * MyISAM works better out of the box for the stream_playlist table + */ + public static function update_360013() { + return Dba::write('ALTER TABLE `stream_playlist` ENGINE=MyISAM'); + } } ?> -- cgit