mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
[Files Refactor] Performance tuning (#2809)
* Use cache during migration * Avoid use of query views * Use FindMany to find related objects * Log slow queries * Add folders to generated files * Use SlimScene for scene queries * Include filename in migration error message
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/stashapp/stash/pkg/logger"
|
||||
"github.com/stashapp/stash/pkg/models"
|
||||
)
|
||||
|
||||
@@ -58,7 +57,6 @@ func (qb queryBuilder) toSQL(includeSortPagination bool) string {
|
||||
func (qb queryBuilder) findIDs(ctx context.Context) ([]int, error) {
|
||||
const includeSortPagination = true
|
||||
sql := qb.toSQL(includeSortPagination)
|
||||
logger.Tracef("SQL: %s, args: %v", sql, qb.args)
|
||||
return qb.repository.runIdsQuery(ctx, sql, qb.args)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user