Bugzilla – Bug 1970
Browse Genres -> Jazz -> Various Artists via remote locking up slimserver
Last modified: 2008-09-15 14:36:01 UTC
Nightly as of last night, on my server (tank) browsing Genres -> Jazz -> Various Artists locked up the server for several minutes. When it did come back there were 30 results.
Dan graciously asked for a log with --d_sql. this is navigating Home -> Browse Music -> Genres -> Jazz -> Various Artists -> Album -> Track -> Info -> Album: 2005-08-13 10:03:00.1696 Generated findKey: [12idOnly genresortByfind genrefield] 2005-08-13 10:03:00.1708 Running SQL query: [SELECT DISTINCT genres.id FROM genres ORDER BY genres.namesort] 2005-08-13 10:03:03.9164 Generated findKey: [12idOnly artistsortBy 3genrefind artistfield] 2005-08-13 10:03:03.9172 Start and End node: [genre:contributor] 2005-08-13 10:03:03.9180 Running SQL query: [SELECT DISTINCT contributors.id FROM genre_track, contributor_track, contributors WHERE contributors.id = contributor_track.contributor AND genre_track.track = contributor_track.track AND ( genre_track.genre = ? ) ORDER BY contributors.namesort] 2005-08-13 10:03:03.9182 Bind arguments: [3] 2005-08-13 10:03:08.4219 Generated findKey: [12idOnly albumsortBy 600artist 3genrefind albumfield] 2005-08-13 10:03:08.4315 Start and End node: [contributor:album] 2005-08-13 10:03:08.4318 Start and End node: [genre:album] 2005-08-13 10:03:08.4326 Running SQL query: [SELECT DISTINCT albums.id FROM genre_track, contributor_track, tracks, albums WHERE contributor_track.track = tracks.id AND genre_track.track = tracks.id AND albums.id = tracks.album AND ( contributor_track.contributor = ? AND genre_track.genre = ? ) ORDER BY albums.titlesort, albums.disc] 2005-08-13 10:03:08.4328 Bind arguments: [600, 3] 2005-08-13 10:10:20.5800 Generated findKey: [12idOnly tracknumsortBy 1611album 600artist 3genrefind trackfield] 2005-08-13 10:10:20.5809 Start and End node: [album:default] 2005-08-13 10:10:20.5812 Start and End node: [contributor:default] 2005-08-13 10:10:20.5815 Start and End node: [genre:default] 2005-08-13 10:10:20.5823 Running SQL query: [SELECT DISTINCT tracks.id FROM genre_track, contributor_track, tracks, contributors, albums, genres WHERE contributor_track.track = tracks.id AND genre_track.track = tracks.id AND contributors.id = contributor_track.contributor AND albums.id = tracks.album AND genres.id = genre_track.genre AND ( contributor_track.contributor = ? AND genre_track.genre = ? AND tracks.album = ? ) ORDER BY tracks.disc, tracks.tracknum, tracks.titlesort] 2005-08-13 10:10:20.5825 Bind arguments: [600, 3, 1611] 2005-08-13 10:14:05.5490 Generated findKey: [12idOnly tracknumsortBy 1611albumfind trackfield] 2005-08-13 10:14:05.5499 Start and End node: [album:default] 2005-08-13 10:14:05.5507 Running SQL query: [SELECT DISTINCT tracks.id FROM tracks, albums WHERE albums.id = tracks.album AND ( tracks.album = ? ) ORDER BY tracks.disc, tracks.tracknum, tracks.titlesort] 2005-08-13 10:14:05.5509 Bind arguments: [1611]
Server Settings -> Behavior -> Filter genres at the album & track level. Filtering can be done when Browsing Genres to only show the albums & tracks that match the selected genre. There is a performance penalty for turning this on, however, your results may be better for "Multi- Genre Artists". Turn off that option. It'll go faster.
Ouch. So, there's no reasonable optimization for this? That's pretty broken. Anything that takes 7 minutes to process is just wrong. Is this because it's a various artists artist?
Not that I've found so far. I'd prefer that we didn't have this option at all, and it defaulted to false. But someone wanted it... It's not because it's a Various Artists.
Tweak to the table ordering sped this up to no time at all. Subversion change 3965.