mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix tag query performance problems (#657)
* Fix sql tracing * Disable query by marker count * Disable unit test
This commit is contained in:
@@ -311,9 +311,12 @@ func executeFindQuery(tableName string, body string, args []interface{}, sortAnd
|
||||
}
|
||||
|
||||
countQuery := buildCountQuery(body)
|
||||
countResult, countErr := runCountQuery(countQuery, args)
|
||||
|
||||
idsQuery := body + sortAndPagination
|
||||
|
||||
// Perform query and fetch result
|
||||
logger.Tracef("SQL: %s, args: %v", idsQuery, args)
|
||||
|
||||
countResult, countErr := runCountQuery(countQuery, args)
|
||||
idsResult, idsErr := runIdsQuery(idsQuery, args)
|
||||
|
||||
if countErr != nil {
|
||||
@@ -325,9 +328,6 @@ func executeFindQuery(tableName string, body string, args []interface{}, sortAnd
|
||||
panic(idsErr)
|
||||
}
|
||||
|
||||
// Perform query and fetch result
|
||||
logger.Tracef("SQL: %s, args: %v", idsQuery, args)
|
||||
|
||||
return idsResult, countResult
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user