[mythtv-users] contrib: myth database optimization
Bruce Markey
bjm at lvcm.com
Tue Nov 30 21:07:23 UTC 2004
Chris Petersen wrote:
> Beirdo was chatting in #mythtv-users about how he saved a bunch of disk
> space by optimizing his mysql databases. I happened to have a script
> that does this kind of thing, along with repairing any necessary tables,
> too.
>
> Anyway, I added in some code from nuvexport to auto-detect the database
> parameters from myth's mysql.txt, and posted it here:
>
> http://forevermore.net/files/optimize_mythdb.pl.gz
"mysqlcheck" "-r" and "-o" will act on all of the tables without
a script to find the table names.
> If there isn't already something like this in contrib, it would be nice
> to get this one checked in (or even better, have this kind of
> functionality built into myth itself).
The built-in function to automatically run mythfilldatabase asks
for "mythfilldatabase Path:". This could be anything but it expects
the status to be updated in the settings table as a result. You
could simply have it call a small script something like this:
#!/bin/sh
mysqlcheck -r -u mythtv -pmythtv mythconverg > /dev/null 2>&1
mythfilldatabase
mysqlcheck -o -u mythtv -pmythtv mythconverg > /dev/null 2>&1
-- bjm
More information about the mythtv-users
mailing list