[mythtv] Long scheduler runs

Mark Buechler mark.buechler at gmail.com
Thu Feb 7 00:03:13 UTC 2008

After some more investigation, I have reason to believe that the index is
not being used. I dropped the index, forced a scheduler rerun and though it
took 26.5 seconds this time instead of the normal 16-17, that particular
query only took 11 seconds - the same as with an index, as shown in

- Mark.

On 2/6/08, Mark Buechler <mark.buechler at gmail.com> wrote:
> 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/009e5d26/attachment.htm 

More information about the mythtv-dev mailing list