CC-2146 : Speed up calendar when there are a large number of shows

adding aggregate column to store amount of time scheduled in show.
percent is only calculated for full calendar events if requested from a week or day view.
This commit is contained in:
Naomi 2011-04-06 17:53:09 -04:00
parent 05f9863bc8
commit 56fc2863bd
13 changed files with 386 additions and 116 deletions

View file

@ -1555,17 +1555,15 @@ class StoredFile {
}
public static function searchPlaylistsForSchedule($time_remaining, $datatables)
public static function searchPlaylistsForSchedule($datatables)
{
$fromTable = "cc_playlist AS pl LEFT JOIN cc_playlisttimes AS plt USING(id) LEFT JOIN cc_subjs AS sub ON pl.editedby = sub.id";
$datatables["optWhere"][] = "INTERVAL '{$time_remaining}' > INTERVAL '00:00:00'";
//$datatables["optWhere"][] = "INTERVAL '{$time_remaining}' > INTERVAL '00:00:00'";
$datatables["optWhere"][] = "plt.length > INTERVAL '00:00:00'";
return StoredFile::searchFiles($fromTable, $datatables);
}
public static function searchFiles($fromTable, $data)
{
global $CC_CONFIG, $CC_DBC;