[mythtv] Long scheduler runs

Mark Buechler mark.buechler at gmail.com
Wed Feb 6 23:44:10 UTC 2008

Firstly, this is not in response to the latest scheduler change to use temp
tables but more something that's existed for a long which I've just noticed.

My scheduler runs typically take 16-17 seconds (after the scheduler change).
After looking at mysql's long running sql log, I see the following:

# Query_time: 11  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
DELETE FROM program WHERE manualid = -1 OR  (manualid <> 0 AND -1 = -1);

That bit comes from Scheduler::UpdateMatches(int recordid) in
programs/mythbackend/scheduler.cpp, second query down. If I comment that
query out, my scheduler runs reduce down to 5-6 seconds. The query seems to
have an index associated (program_manualid) but still takes a very long time
to run.

How necessary is this query? Can this be done another way?

Thanks, Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20080206/953605a5/attachment.htm 

More information about the mythtv-dev mailing list