I prepare my Airtime server for producing on September 22. I added several shows (see attachment) from 8h to 22h. Since I made this adds, access to my library has become slow, even the home page that displays nothing yet has been slow to appear.
UPDATE cc_files SET is_scheduled = false WHERE is_scheduled = true AND id NOT IN ( SELECT s.file_id FROM cc_schedule AS s LEFT JOIN cc_show_instances AS i ON s.instance_id = i.id WHERE s.ends > now() at time zone 'UTC'AND i.ends > now() at time zone 'UTC' );
Whenever I run this query the process up to 99%, why?
If I make a SELECT * FROM cc_files WHERE is_scheduled = true, the value of is_scheduled is always "true", why after a update ??
Well I solved my problem! I created Smart Blocks for a period of 24 hours which I attributed to the shows of one hour. There were 23 hours of excess and the query (see above) should take too long.
So I created two hours blocks, empty all my shows to reallocate smarty blocks.