summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-04-29 15:12:10 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2013-04-29 15:18:35 -0400
commitcf5a674965b3d944b2747b6aeae8cfc79c26e6f4 (patch)
tree027c395f3e9aedd7ddd78f8aa7f809949be5e5c6 /lib
parent323554838d3c07c3bf47ce9ae72fd870c6614e33 (diff)
downloadampache-cf5a674965b3d944b2747b6aeae8cfc79c26e6f4.tar.gz
ampache-cf5a674965b3d944b2747b6aeae8cfc79c26e6f4.tar.bz2
ampache-cf5a674965b3d944b2747b6aeae8cfc79c26e6f4.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/class/update.class.php15
1 files changed, 14 insertions, 1 deletions
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.<br />';
$version[] = array('version' => '360012', 'description' => $update_string);
+
+ $update_string = '- Update stream_playlist table to address performance issues.<br />';
+ $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');
+ }
}
?>