mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-20 22:34:37 +01:00
Merge pull request #4285 from paperbagcorner/sqlite-3.8
Fix slow library search on sqlite 3.8.
This commit is contained in:
commit
c94a94ece2
@ -128,7 +128,13 @@ void LibraryQuery::AddWhere(const QString& column, const QVariant& value,
|
||||
}
|
||||
|
||||
void LibraryQuery::AddCompilationRequirement(bool compilation) {
|
||||
where_clauses_ << QString("effective_compilation = %1")
|
||||
// The unary + is added to prevent sqlite from using the index
|
||||
// idx_comp_artist. When joining with fts, sqlite 3.8 has a tendency
|
||||
// to use this index and thereby nesting the tables in an order
|
||||
// which gives very poor performance. See
|
||||
// https://github.com/clementine-player/Clementine/pull/4285 for
|
||||
// more details.
|
||||
where_clauses_ << QString("+effective_compilation = %1")
|
||||
.arg(compilation ? 1 : 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user