View Full Version : What is this SQL query?

2006-03-23, 22:18

I'm running slimserver with a mysql server backend. Today all of a sudden I started getting dropouts in playback. A bit of looking around revealed the cause was due to this SQL query being emitted every minute or so:

2006-03-24 14:12:12.6784 Running SQL query: [SELECT DISTINCT albums.id AS id,albums.title AS title,albums.titlesort AS titlesort,albums.contributor AS contributor,albums.compilation AS compilation,albums.year AS year,albums.artwork_path AS artwork_path,albums.disc AS disc,albums.discc AS discc,albums.musicmagic_mixable AS musicmagic_mixable FROM tracks, albums WHERE albums.id = tracks.album ORDER BY tracks.age desc, tracks.disc, tracks.tracknum, tracks.titlesort LIMIT 100]

I ran this query in isolation and verified it takes 1.5s to execute, and this is enough for a dropout in my setup (SB1/WAV).

I had a quick look in the code but couldn't find where this query is being generated. Anyone know what the query is doing and whether it's possible to disable it?


2006-03-24, 02:17
I'm not sure but looking at the sql it could well be the query for the "New music" view. The query lists 100 albums ordered by age, newest first. I have no idea why this would by called every minute unless you had a browser window open showing the "New music" view and have it reload every minute.