mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
Speed up NetworkActivity by joining fewer rows
This commit is contained in:
@@ -80,6 +80,7 @@ DatabaseCommand_TrendingArtists::exec( DatabaseImpl* dbi )
|
||||
" WHERE playback_log.source IS NOT NULL " // exclude self
|
||||
" AND playback_log.playtime >= %1 AND playback_log.playtime <= %2 "
|
||||
" GROUP BY track.artist "
|
||||
" HAVING counter > 0 "
|
||||
);
|
||||
QString lastWeekSql = timespanSql.arg( _1WeekAgo.toTime_t() ).arg( now.toTime_t() );
|
||||
QString _1BeforeLastWeekSql = timespanSql.arg( _2WeeksAgo.toTime_t() ).arg( _1WeekAgo.toTime_t() );
|
||||
|
@@ -81,6 +81,7 @@ DatabaseCommand_TrendingTracks::exec( DatabaseImpl* dbi )
|
||||
" WHERE playback_log.source IS NOT NULL " // exclude self
|
||||
" AND playback_log.playtime >= %1 AND playback_log.playtime <= %2 "
|
||||
" GROUP BY playback_log.track "
|
||||
" HAVING counter > 0 "
|
||||
);
|
||||
QString lastWeekSql = timespanSql.arg( _1WeekAgo.toTime_t() ).arg( now.toTime_t() );
|
||||
QString _1BeforeLastWeekSql = timespanSql.arg( _2WeeksAgo.toTime_t() ).arg( _1WeekAgo.toTime_t() );
|
||||
|
Reference in New Issue
Block a user