[mythtv-users] database problems, primary and index keys.

Michael T. Dean mtdean at thirdcontact.com
Sun Apr 1 18:07:34 UTC 2007


On 04/01/2007 01:38 PM, Khanh Tran wrote:
> I'm having some performance issues with my database, and I think I've
> narrowed down the issue to the following errors that phpMyAdmin
> reports after checking the tables.
>
> Besides the obvious of "removing one", how do I fix these errors?  For
> example, the recstatus column in oldrecorded.  How do I know which
> should be the index key?  I'm working with the latest out of the
> 0.20-fixes branch.
>
> Problems with indexes of table `oldrecorded`
> More than one INDEX key was created for column `recstatus`
> Problems with indexes of table `program`
> PRIMARY and INDEX keys should not both be set for column `chanid`
> Problems with indexes of table `recgrouppassword`
> PRIMARY and INDEX keys should not both be set for column `recgroup`
> Problems with indexes of table `recordedprogram`
> PRIMARY and INDEX keys should not both be set for column `chanid`
> Problems with indexes of table `videometadata`
> More than one INDEX key was created for column `title`

My recommendation is:  
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.5 then 
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.6 then 
http://mythtv.org/docs/mythtv-HOWTO-6.html#ss6.2 then 
http://mythtv.org/docs/mythtv-HOWTO-23.html#ss23.7

Anything else is likely to cause problems and leave a lot of garbage 
(which is probably causing the issues) on your system.  The above is the 
MythTV MySQL Database equivalent of "format c:" followed by a fresh 
Windows install (only difference is one of the two should only be 
required for one user in 10000 (est) and the other is required for all 
users once every year--but preferrably once every 6 months).

Mike


More information about the mythtv-users mailing list