mopidy / mopidy-local-sqlite

DEPRECATED (Mopidy SQLite local library extension)
https://mopidy.com
Apache License 2.0
30 stars 10 forks source link

Create an "albums" View #10

Closed tkem closed 10 years ago

tkem commented 10 years ago

For testing and debugging, an albums view similar to the tracks view would be convenient. Unless performance measurements recommend otherwise, this should be also be used in the tracks join, instead of the separate joins for album and albumartist.

tkem commented 10 years ago

Having separate views for artists, composers and performers would also be nice.

tkem commented 10 years ago

Turns out, using albums in tracks does have significant performance implications. Running

time mpc ls 'Local media/Tracks' > /dev/null

on a ~6000 tracks media collection with current view tags ~6.4sec, with album table replaced by albums view takes ~16sec. Looking at the query plan shows SQLite first scans albums, then tracks(?). Deferred.