[mythtv] contrib: myth database optimization

Asher Schaffer freedenizen at gmail.com
Tue Nov 30 16:10:42 UTC 2004

I haven't looked into this much, but I think some good automated DB
optimizing would be a really nice addition.  Personally, my DB
knownledge is all with Postgres not mysql, does mysql have anything
similar to clustering in Postgres, where a table gets reordering
according to an index?

On slower systems (my EPIA for example), the speed of the SQL queries
really makes a large difference in usability.

Here is what OPTIMIZE TABLE does:
1 If the table has deleted or split rows, repair the table.
2 If the index pages are not sorted, sort them.
3 If the statistics are not up to date (and the repair couldn't be
done by sorting the index), update them.

I'm going to see about spending sometime playing with the MYSQL conf
settings, I haven't found a guide anywhere for recommended mysql
settings for use with myth.  Granted different HD/Memory/Processor
configurations would lead to drasticly different settings, but I'm
sure there are some good low end/ mid range/ high end optimization
that can be done.

On Mon, 29 Nov 2004 21:25:50 -0800, Chris Petersen
<lists at forevermore.net> 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
> 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).
> -Chris
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list