banshee r4289 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Database
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4289 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Database
- Date: Tue, 29 Jul 2008 18:03:23 +0000 (UTC)
Author: gburt
Date: Tue Jul 29 18:03:22 2008
New Revision: 4289
URL: http://svn.gnome.org/viewvc/banshee?rev=4289&view=rev
Log:
2008-07-29 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs:
Add an index on CoreTracks that should help with the performance of the
cover art query.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Database/BansheeDbFormatMigrator.cs Tue Jul 29 18:03:22 2008
@@ -52,7 +52,7 @@
// 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 = 16;
+ protected const int CURRENT_VERSION = 17;
protected const int CURRENT_METADATA_VERSION = 2;
#region Migration Driver
@@ -469,6 +469,18 @@
}
#endregion
+
+#region Version 17
+
+ [DatabaseVersion (17)]
+ private bool Migrate_17 ()
+ {
+ Execute ("CREATE INDEX CoreTracksCoverArtIndex ON CoreTracks (PrimarySourceID, AlbumID, DateUpdatedStamp)");
+ Execute ("ANALYZE");
+ return true;
+ }
+
+#endregion
#pragma warning restore 0169
@@ -554,6 +566,7 @@
Execute("CREATE INDEX CoreTracksAggregatesIndex ON CoreTracks(FileSize, Duration)");
Execute("CREATE INDEX CoreTracksExternalIDIndex ON CoreTracks(PrimarySourceID, ExternalID)");
Execute("CREATE INDEX CoreTracksUriIndex ON CoreTracks(PrimarySourceID, Uri)");
+ Execute("CREATE INDEX CoreTracksCoverArtIndex ON CoreTracks (PrimarySourceID, AlbumID, DateUpdatedStamp)");
Execute(@"
CREATE TABLE CoreAlbums (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]