fix(server): change sorting from rowid to id for improved sync performance for artists
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -27,9 +27,9 @@ func (r sqlRepository) doSearch(sq SelectBuilder, q string, offset, size int, in
|
|||||||
sq = sq.Where(filter)
|
sq = sq.Where(filter)
|
||||||
sq = sq.OrderBy(orderBys...)
|
sq = sq.OrderBy(orderBys...)
|
||||||
} else {
|
} else {
|
||||||
// If the filter is empty, we sort by rowid.
|
// If the filter is empty, we sort by id.
|
||||||
// This is to speed up the results of `search3?query=""`, for OpenSubsonic
|
// This is to speed up the results of `search3?query=""`, for OpenSubsonic
|
||||||
sq = sq.OrderBy(r.tableName + ".rowid")
|
sq = sq.OrderBy(r.tableName + ".id")
|
||||||
}
|
}
|
||||||
if !includeMissing {
|
if !includeMissing {
|
||||||
sq = sq.Where(Eq{r.tableName + ".missing": false})
|
sq = sq.Where(Eq{r.tableName + ".missing": false})
|
||||||
|
|||||||
Reference in New Issue
Block a user