You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another and (hopefully) final attempt to improve querying speed.
Fixes#4360Fixes#3515
and possibly more issues to do with slow queries.
This PR supersedes #4746.
## What's been done
The `album` and `item` tables are joined, and corresponding data from
`item_attributes` and `album_attributes` is merged and made available
for filtering. This enables to achieve the following:
- [x] Faster album path queries, `beet list -a path::some/path`
- [x] Faster flexible attributes queries, both albums and tracks, `beet
list play_count:10`
- [x] (New) Ability to filter albums with track-level (and vice-versa)
**db** field queries, `beet list -a title:something`
- [x] (New) Ability to filter tracks with album-level **flexible** field
queries, `beet list artpath:cover`
- [x] (New) Ability to filter albums with track-level **flexible** field
queries, `beet list -a art_source:something`
## Benchmarks
![image](https://github.com/beetbox/beets/assets/16212750/3136bc23-33ea-4f07-b93b-ff768b79fb0d)
You can see that now querying speed is more or less constant regardless
of the query, and the speed is mostly influenced by how many results
need to be printed out
![image](https://github.com/beetbox/beets/assets/16212750/bfb037fb-b8d3-46ca-9c30-f851d2af1887)
Compare this with what we had previously
![image](https://github.com/beetbox/beets/assets/16212750/38108879-a404-4cdf-90cc-5563e4a75f9f)
## Later
#5318#5319
Once #5240 is merged, adjust the templates resolution logic using the new design to remove additional SQL queries.
The text was updated successfully, but these errors were encountered: