> SELECT COUNT( * ) FROM (SELECT me.id FROM tracks me WHERE ( me.audio = '1' )
> GROUP BY me.id, me.url, me.content_type, me.title, me.titlesort,
> me.titlesearch, me.album, me.primary_artist, me.tracknum, me.timestamp,
> me.filesize, me.disc, me.remote, me.audio, me.audio_size, me.audio_offset,
> me.year, me.secs, me.cover, me.vbr_scale, me.bitrate, me.samplerate,
> me.samplesize, me.channels, me.block_alignment, me.endian, me.bpm,
> me.tagversion, me.drm, me.musicmagic_mixable, me.musicbrainz_id, me.lossless,
> me.lyrics, me.replay_gain, me.replay_peak, me.extid) count_subq;
Ouch! That looks bad.
There's no point for the group by - it's grouping by the primary key (unique id
column), so it's never going to group any rows up. So you'll get the same
result with:
SELECT COUNT(*) FROM tracks WHERE audio = '1'
Which I think is a little bit more efficient ;-)
I wonder why it's doing it every minute though?
Phil
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta