mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
reduce library queries
This commit is contained in:
parent
1dc080df8b
commit
f275d7f3d2
32 changed files with 230 additions and 176 deletions
|
|
@ -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"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue