Skip to content

Commit 9ca95bf

Browse files
committed
Added album_id index to speed up queries against album items.
1 parent 91c8fcc commit 9ca95bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

beets/library/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ class Item(LibModel):
716716
"mtime": types.DATE,
717717
"added": types.DATE,
718718
}
719+
_indices = (dbcore.Index("idx_item_album_id", ("album_id",)),)
719720

720721
_search_fields = (
721722
"artist",

0 commit comments

Comments
 (0)