<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 29 July 2015 at 13:17, Stephen Worthington <span dir="ltr"><<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And also check for the recordedseek entries still present belonging to<br>
recordings that have been deleted.  This might work, but will take a<br>
long time to run on a large database:<br>
<br>
select rs.chanid,rs.starttime from recordedseek rs where not exists<br>
(select 'x' from recorded r where r.chanid=rs.chanid and<br>
r.starttime=rs.starttime);<br>
<br>
There is probably a more efficient query using left outer join.  Then<br>
you would need to delete all those entries the query listed.<br>
<br><br></blockquote><div> </div></div></div><div class="gmail_extra">recordedseek entries for already-deleted programs will be tidied up by background housekeeping, so you can skip that. Just let the housekeeping thread deal with it in its own time.<br></div></div>