diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-21 03:54:53 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-21 03:54:53 -0500 |
| commit | f275d7f3d2f40f5e4cbe2f97df6dbd9be8ec37fe (patch) | |
| tree | 44d15fc67ebe2b131e77531cd7e14c33bd695370 /Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | |
| parent | 1dc080df8ba5b9af9245788634d56cb155afd2ba (diff) | |
reduce library queries
Diffstat (limited to 'Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs index 5fc691527..66ef5d5d1 100644 --- a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs +++ b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs @@ -31,10 +31,9 @@ namespace Emby.Server.Implementations.Notifications { connection.ExecuteAll(string.Join(";", new[] { + "PRAGMA page_size=4096", "pragma default_temp_store = memory", - "pragma default_synchronous=Normal", - "pragma temp_store = memory", - "pragma synchronous=Normal", + "pragma temp_store = memory" })); string[] queries = { @@ -57,9 +56,9 @@ namespace Emby.Server.Implementations.Notifications { var result = new NotificationResult(); - using (WriteLock.Read()) + using (var connection = CreateConnection(true)) { - using (var connection = CreateConnection(true)) + //using (WriteLock.Read()) { var clauses = new List<string>(); var paramList = new List<object>(); @@ -114,7 +113,7 @@ namespace Emby.Server.Implementations.Notifications using (var connection = CreateConnection(true)) { - using (WriteLock.Read()) + //using (WriteLock.Read()) { using (var statement = connection.PrepareStatement("select Level from Notifications where UserId=@UserId and IsRead=@IsRead")) { |
