[mythtv-users] Mass channel deletes

Bruce Markey bjm at lvcm.com
Tue Sep 20 07:42:06 UTC 2005


Michael T. Dean wrote:
> Bruce Markey wrote:
> 
>> Dave Sherohman wrote:
>>
>>> Would I break my existing
>>> recordings or upcoming recording schedule if I just deleted all
>>> records from the channel table, then ran mythfilldatabase manually to
>>> reconstruct it?
>>
>>
>> That would work but would leave behind program information that
>> might be found in searches so you may want to remove all the
>> program information also.
>>
>> $ mysql -u mythtv -pmythtv mythconverg
>> mysql> truncate table channel;
>> mysql> truncate table program;
>> mysql> truncate table programrating;
>> mysql> truncate table programgenres;
>> mysql> truncate table credits;
>> mysql> truncate table people;
>>
>> then run "mythfilldatabase" again.
> 
> 
> Since TMS currently adds "new" channels to all lineups (instead of 
> allowing you to choose to lock in a lineup), and since I have DISH 
> network (which is adding all the local stations around the country), I 
> get new channels at least once a week (sometimes several channels per day).

On one of their surveys, TMS asked if there should be an option
to not automatically add channels. Appearently nothing has come
of that. I'm sure in your situation I'd rather go in and check new
channels periodically or when I fould out that my provider added
a channel I want to receive.

> To keep the 13 channels to which I've subscribed, I've been deleting the 
> channel and program information after updating my lineup at zap2it.  
> However, I've never deleted any info from programrating, programgenres, 
> credits, or people.  It looks like it's been getting deleted after 
> "expiring," but I wanted to verify that my (lazy) approach should not 
> cause any problems.

Mine was the Adrian Monk approach. Most of these have dates and
will expire. "people" doesn't but it's a finite set and the same
names come up again. If the program table is emptied so that you
can't match a bogus show then the auxiliary info doesn't matter.

AFAIK, this isn't a problem right now, however, there have been
times in the past that mfdb may have leaked data by not cleaning
up properly and I used to dump out all of these tables every so
often just to be sure that I wasn't building up cruft. One thing
you could do is "select count(*) from tablename;" to find what the
normal sizes are and if any table is growing over time.

--  bjm


More information about the mythtv-users mailing list