[mythtv-users] Running optimize_mythdb.pl before mythfilldatabase

Michael T. Dean mtdean at thirdcontact.com
Tue Feb 20 03:27:52 UTC 2007


On 02/19/2007 07:19 PM, David Brodbeck wrote:
> Michael T. Dean wrote:
>   
>> Wouldn't it make sense to call mythfilldatabase first and then 
>> optimize_mythdb.pl (since mfdb does a lot of deletes and then a lot of 
>> inserts--it deletes all listings data for a given source for any day 
>> that it updates and then puts in the whole days data).
>>
>> I guess you could argue that running mfdb on a corrupt database would be 
>> bad, but since the table most likely to be corrupt is recordedseek 
>> (which isn't touched by mfdb)...
> I suppose ideally you'd do the 'REPAIR TABLE' part before
> mythfilldatabase, and the 'OPTIMIZE TABLE' part afterwards. ;)
>   

I stand corrected...  :)

I'm also considering asking Chris Pinkham if he'd be interested in a 
patch that puts the REPAIR and OPTIMIZE in the housekeeper.  I was 
thinking in DailyCleanup, but now, I'm thinking DailyCleanup for REPAIR 
and MythFillDB for OPTIMIZE (actually putting the OPTIMIZE calls in a 
new function that can be called after runFillDatabase() for those 
running mfdb, and from CleanupProgramListings() for those not running mfdb).

Hmmm.  It seems I just asked...

> Actually, strictly speaking, 'REPAIR TABLE' should never be necessary
> unless you've had a power cut, overfilled disk, or other, similar
> catastrophe.

I don't trust "should" in the real world.  :)

Mike


More information about the mythtv-users mailing list