CC-3331: Optimize "Now Playing" to load in less than 1/2 second
- cleaned up sql statement Schedule's getScheduleItemsInRange
This commit is contained in:
parent
5dd94ce12c
commit
c7f4b17e81
|
@ -313,13 +313,13 @@ class Application_Model_Schedule {
|
||||||
." si.id as instance_id,"
|
." si.id as instance_id,"
|
||||||
." pt.name as playlist_name"
|
." pt.name as playlist_name"
|
||||||
." FROM ".$CC_CONFIG["showInstances"]." si"
|
." FROM ".$CC_CONFIG["showInstances"]." si"
|
||||||
." LEFT JOIN ".$CC_CONFIG[scheduleTable]." st"
|
." LEFT JOIN ".$CC_CONFIG["scheduleTable"]." st"
|
||||||
." ON st.instance_id = si.id"
|
." ON st.instance_id = si.id"
|
||||||
." LEFT JOIN ".$CC_CONFIG[playListTable]." pt"
|
." LEFT JOIN ".$CC_CONFIG["playListTable"]." pt"
|
||||||
." ON st.playlist_id = pt.id"
|
." ON st.playlist_id = pt.id"
|
||||||
." LEFT JOIN ".$CC_CONFIG[filesTable]." ft"
|
." LEFT JOIN ".$CC_CONFIG["filesTable"]." ft"
|
||||||
." ON st.file_id = ft.id"
|
." ON st.file_id = ft.id"
|
||||||
." LEFT JOIN ".$CC_CONFIG[showTable]." s"
|
." LEFT JOIN ".$CC_CONFIG["showTable"]." s"
|
||||||
." ON si.show_id = s.id"
|
." ON si.show_id = s.id"
|
||||||
." WHERE ((si.starts < TIMESTAMP '$timeNow' - INTERVAL '$start seconds' AND si.ends > TIMESTAMP '$timeNow' - INTERVAL '$start seconds')"
|
." WHERE ((si.starts < TIMESTAMP '$timeNow' - INTERVAL '$start seconds' AND si.ends > TIMESTAMP '$timeNow' - INTERVAL '$start seconds')"
|
||||||
." OR (si.starts > TIMESTAMP '$timeNow' - INTERVAL '$start seconds' AND si.ends < TIMESTAMP '$timeNow' + INTERVAL '$end seconds')"
|
." OR (si.starts > TIMESTAMP '$timeNow' - INTERVAL '$start seconds' AND si.ends < TIMESTAMP '$timeNow' + INTERVAL '$end seconds')"
|
||||||
|
|
Loading…
Reference in New Issue