[mythtv-users] Slow MySQL query after delete

Michael T. Dean mtdean at thirdcontact.com
Thu Nov 29 02:49:34 UTC 2007

On 11/28/2007 08:16 PM, Larry K wrote:
> I am also having trouble with the BUSQ when I delete recordings, with query
> times no better than 7-8 seconds.  This is on an Athlon 2500+ with 512MB
> ram.

That's right where it should be.

>   Myth 0.20 and MySQL 5.0.37, I think.   Before I upgraded to 0.20, I
> was running 0.18 and this problem did not exist for me.  I'm guessing this
> BUSQ was introduced after 0.18.

It's been in there since Myth was born.  The difference is that Myth
happens to run this query at times when you happen to notice it. 
Though, if you configure Myth appropriately you shouldn't even notice (I
don't and mine takes 6-7 seconds).  Unfortunately, configuring Myth
appropriately means appropriately for your specific configuration, so I
can't just tell you what to change.  (Though there's a good chance you
/should/ enable slow deletes.)

> I cleaned up my recording schedules to eliminate duplicate schedules (there
> were a few), and I also tried to avoid schedules on 'any channel'.  I
> currently have 4,800 rows in oldrecorded, 550 rows in recordmatch, and 100
> rows in record.  None of this seems excessive to me.  I also optimized my
> database, and it still takes 6-7 seconds to run this query.
> I wonder if 6-7 seconds is as good as it gets for me? 

Yep.  Without changing your MySQL configuration, that's as good as it
will get.  I'll leave figuring out how to change your MySQL
configuration--and the consequences of doing so--to you (as really, the
fact that it takes 6-7 seconds to schedule recordings should make no
difference to you).


More information about the mythtv-users mailing list