[banshee] Remove an index on smart playlists that was causing an enourmous slowdown (BGO #581103)
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Remove an index on smart playlists that was causing an enourmous slowdown (BGO #581103)
- Date: Fri, 22 May 2009 12:00:51 -0400 (EDT)
commit 23274f2ca744391ef3f54e044eb2f7399aa457ff
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri May 22 10:55:26 2009 -0500
Remove an index on smart playlists that was causing an enourmous slowdown (BGO #581103)
---
.../Banshee.Database/BansheeDbFormatMigrator.cs | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs b/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
index 1f59444..19cdbce 100644
--- a/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
+++ b/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
@@ -56,7 +56,7 @@ namespace Banshee.Database
// NOTE: Whenever there is a change in ANY of the database schema,
// this version MUST be incremented and a migration method
// MUST be supplied to match the new version number
- protected const int CURRENT_VERSION = 31;
+ protected const int CURRENT_VERSION = 32;
protected const int CURRENT_METADATA_VERSION = 6;
#region Migration Driver
@@ -745,6 +745,19 @@ namespace Banshee.Database
}
return true;
}
+
+#endregion
+
+#region Version 32
+
+ [DatabaseVersion (32)]
+ private bool Migrate_32 ()
+ {
+ Execute ("DROP INDEX IF EXISTS CoreSmartPlaylistEntriesPlaylistIndex");
+ Execute ("DROP INDEX IF EXISTS CoreSmartPlaylistEntriesIndex");
+ Execute ("ANALYZE");
+ return true;
+ }
#endregion
@@ -935,7 +948,6 @@ namespace Banshee.Database
TrackID INTEGER NOT NULL
)
");
- Execute("CREATE INDEX CoreSmartPlaylistEntriesPlaylistIndex ON CoreSmartPlaylistEntries(SmartPlaylistID, TrackID)");
Execute(@"
CREATE TABLE CoreRemovedTracks (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]