[banshee] [LibraryWatcher] Fix very slow query
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [LibraryWatcher] Fix very slow query
- Date: Sun, 11 Jul 2010 21:51:49 +0000 (UTC)
commit de5134329120c9019d0e7fbb193a20bd51a31ba5
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sun Jul 11 14:50:23 2010 -0700
[LibraryWatcher] Fix very slow query
Adding a PrimarySourceID condition speeds things up greatly (bgo#622826)
.../Banshee.LibraryWatcher/SourceWatcher.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
index 8d28ca0..60d5eb5 100644
--- a/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
+++ b/src/Extensions/Banshee.LibraryWatcher/Banshee.LibraryWatcher/SourceWatcher.cs
@@ -189,7 +189,7 @@ namespace Banshee.LibraryWatcher
{
using (var reader = ServiceManager.DbConnection.Query (
DatabaseTrackInfo.Provider.CreateFetchCommand (
- "CoreTracks.Uri = ? LIMIT 1"), new SafeUri (track).AbsoluteUri)) {
+ "CoreTracks.PrimarySourceID = ? AND CoreTracks.Uri = ? LIMIT 1"), library.DbId, new SafeUri (track).AbsoluteUri)) {
if (reader.Read ()) {
var track_info = DatabaseTrackInfo.Provider.Load (reader);
if (Banshee.IO.File.GetModifiedTime (track_info.Uri) > track_info.FileModifiedStamp) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]