Thanks for the response, maybe you or someone can clarify<br>some of my questions below. I have provided further info.<br><br><div class="gmail_quote">On Thu, Nov 13, 2008 at 1:03 PM, Michael T. Dean <span dir="ltr">&lt;<a href="mailto:mtdean@thirdcontact.com">mtdean@thirdcontact.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
</div>OK, by your saying, &quot;when the system deleted the files out of the<br>
&#39;deleted&#39; group,&quot; you&#39;re implying that you deleted the files to the<br>
Deleted recording group. &nbsp;If you do, the duplicate flag is automatically<br>
changed depending on which delete you select (i.e. is enabled/set to 1<br>
if you say, &quot;Delete,&quot; and disabled/set to 0 if you say &quot;Delete and allow<br>
re-record&quot;) when you delete the recording to the Deleted recgroup.<br>
(From inside the Deleted recgroup, deleting--not saying, &quot;Delete and<br>
allow re-record&quot;--to remove the file from disk will not flip the switch,<br>
so whatever you chose when deleting it to the Deleted recgroup will stand.)<br>
</blockquote><div><br>yes, this feature was not working. I was using the &quot;Delete&quot; button, NOT &quot;delete<br>and allow re-record&quot;, yet, these programs were still being re-recorded, and<br>in the oldrecorded table, the &quot;duplicate&quot; flag for these rows was &quot;0&quot;<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There /was/ (a /very/ long time ago) a bug in MythWeb that meant that<br>
recordings deleted from MythWeb weren&#39;t properly marked for duplicate<br>
detection.</blockquote><div>&nbsp;</div><div>I was using the frontend to delete, NOT mythweb.<br><br>I am running the following version, and I did not have problems<br>&nbsp; with repeat recording until recently:<br>mythtv@dora:~$ mythbackend --version<br>
Source code version&nbsp;&nbsp;&nbsp;&nbsp; : 14657<br>SVN branch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : trunk<br>Library API version&nbsp;&nbsp;&nbsp;&nbsp; : 0.21.20070910-2<br>Network Protocol Version: 36<br>Options compiled in:<br>&nbsp;linux release using_oss using_alsa using_arts using_jack using_backend using_dbox2 using_dvb using_firewire using_frontend<br>
using_hdhomerun using_iptv using_ivtv using_joystick_menu using_lirc using_opengl_vsync using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmcw using_xvmc_vld using_bindings_perl using_opengl using_live&nbsp;&nbsp;&nbsp; <br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
&gt; After updating the table with &quot;update oldrecorded set duplicate=&#39;1&#39;;&quot;,<br>
&gt; I decided to clean up all the duplicate entries in the table. I had several hundred<br>
&gt; lines which were duplicate title and subtitle,<br>
<br>
</div>As there should be. &nbsp;The recording status for all airings of shows<br>
matching recording rules in the current program listings as well as some<br>
history (7 or 10 days--I don&#39;t feel like looking right now) is kept for<br>
reference (i.e. so you can tell why a specific episode didn&#39;t record).</blockquote><div>&nbsp;</div><div>The oldrecorded table has its earliest entry with<br>starttime of &quot;2007-08-11 02:15:00&quot;. I was talking about cleaning up<br>
lines which were duplicate title and subtitle for shows that had, in fact,<br>recorded, again and again.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; &nbsp;so I copied the table to &quot;oldrecorded_test&quot;<br>
&gt; &nbsp; create table oldrecorded_test as select * from oldrecorded;<br>
&gt; and made a delete statement as follows:<br>
&gt; &nbsp; delete from oldrecorded_test T1 where starttime not in<br>
&gt;<br>
&gt; &nbsp; select max (starttime) from oldrecorded_test T2 where T2.programid=T1.programid);<br>
&gt; From the contents of oldrecorded_test, this appeared to have worked, so I renamed<br>
&gt; &quot;oldrecorded&quot; to &quot;oldrecorded_back&quot;, and renamed &quot;oldrecorded_test&quot; to &quot;oldrecorded&quot;.<br>
<br>
</div>Here, you deleted all sorts of important information. &nbsp;BTW, Myth<br>
automatically cleans up this and other tables.</blockquote><div><br>ok, well i was trying to cleanup the hundreds of lines that were in this<br>table from all of the recordings that had been recorded 3 or 4 times,<br>even though I had already watched and deleted them. The query was<br>
supposed to delete only rows for programs that had duplicate<br>programids and to leave the programid with the oldest starttime.<br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">
&gt; dropped down under 10 seconds, sometimes as low as 2 seconds.<br>
&gt; My frontend is not hanging like it was, and everything seems better.<br>
&gt;<br>
&gt; Some conclusions and questions:<br>
&gt;<br>
&gt; I am not a database expert, so is there something wrong with the way I copied the<br>
&gt; table as I listed above?<br>
&gt;<br>
<br></div>Erm.... &nbsp;Yeah, you broke Myth&#39;s data.</blockquote><div>&nbsp;</div><div>so which data was missing then? if I deleted rows from oldrecorded<br>for programs, which data was mythtv looking for? I still have the damaged<br>
table to examine, it&#39;s just been renamed.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">&gt; Perhaps some of the other people having issues with slow deletes hanging the frontend<br>

&gt; have done as I did, and have something wrong with the table itself. Is there a way to<br>
&gt; check the oldrecorded table for correct structure,<br>
<br>
</div>It&#39;s done automatically once per day by the backend, so just run the<br>
backend.</blockquote><div><br>Restarting the frontend/backend/computer did not fix the problem,<br>and i didn&#39;t see errors in the mythbackend log file about missing data.<br>But maybe I wasn&#39;t looking in the right place.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
&gt; &nbsp;other that the &quot;optimize_mythdb.pl&quot; script?<br>
</div><br>That does other stuff, but still useful. &nbsp;I run it in a daily cron job<br>
at some time in /very/ early morning (when recordings are unlikely).<br>
<div class="Ih2E3d"><br>
&gt; &nbsp;Is there a way to delete and recreate this table as it should be, as a last<br>
&gt; resort for those who have no backup and can&#39;t get their frontend to work?<br>
<br>
</div>Basically, the standard answer applies: &nbsp;don&#39;t mess with the DB data.<br>
(No matter how much you think you understand the schema/data/constraints<br>
upon that data, Myth understands it much better.) &nbsp;And remember that<br>
Myth cleans up all the old/unnecessary data automatically for you, so no<br>
need to mess with the data.</blockquote><div><br>Yes, but what if your table is already messed up? how would one fix it? <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Mike<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br>
</blockquote></div><br>