[mythtv-users] scheduler doesn't run ?

Per Jessen per at computer.org
Fri Jan 15 13:31:49 UTC 2016


Michael T. Dean wrote:

> On 01/15/2016 06:41 AM, Per Jessen wrote:
>> Per Jessen wrote:
>>
>>> Tables used here are:  record (442 rows), program (137549 rows),
>>> channel (821 rows) and recordmatch (2459 rows).
>> Looking at 'program':
>>
>> mysql> select count(*) from program where starttime>now();
>> +----------+
>> | count(*) |
>> +----------+
>> |    40234 |
>> +----------+
>> 1 row in set (0.03 sec)
>>
>> mysql> select count(*) from program where starttime<now();
>> +----------+
>> | count(*) |
>> +----------+
>> |    89180 |
>> +----------+
>> 1 row in set (0.06 sec)
>>
>>
>> Does that make sense?
> 
> Probably.  We keep program information for 10 days after airing, to
> allow for diagnosis of missed recordings. 

Ah, okay. 

> I'm guessing you get somewhere less than 10 days of guide data from
> EIT or something? 

Probably, yes. 

> Check:
> 
> SELECT MIN(starttime), MAX(starttime) FROM program;

Yeah, the listings span from 5 Jan to 23 Jan. 

> SELECT COUNT(*) FROM program WHERE starttime < SUBDATE(now(), 10);
> 
> which should be very small 

4701. 

> (might be > 0, depending on specific time 
> the housekeeper ran program listings cleanup) and
> 
> SELECT COUNT(*) FROM program WHERE starttime < SUBDATE(now(), 11);
> 
> should be zero, assuming the housekeeper ran yesterday.

zero. 

> and you can do:
> 
> SELECT DATEDIFF(starttime, NOW()) AS age,
>     COUNT(DATEDIFF(starttime, NOW())) AS programs
>     FROM program GROUP BY age;
> 
> to see how your programs are distributed--where negative values are
> old data and positive are future data.

Yeah, I ran something similar:

mysql> select date(starttime),count(*) from program group by
date(starttime);
+-----------------+----------+
| date(starttime) | count(*) |
+-----------------+----------+
| 2016-01-05      |     8310 |
| 2016-01-06      |     8641 |
| 2016-01-07      |     8789 |
| 2016-01-08      |     8300 |
| 2016-01-09      |     8074 |
| 2016-01-10      |     8174 |
| 2016-01-11      |     8452 |
| 2016-01-12      |     8873 |
| 2016-01-13      |     8840 |
| 2016-01-14      |     8662 |
| 2016-01-15      |     7397 |
| 2016-01-16      |     5500 |
| 2016-01-17      |     5303 |
| 2016-01-18      |     5444 |
| 2016-01-19      |     5289 |
| 2016-01-20      |     5242 |
| 2016-01-21      |     5277 |
| 2016-01-22      |     4939 |
| 2016-01-23      |      207 |
+-----------------+----------+

Well, 137000 rows just seemed a lot to me, that's why I started looking
at 'program';


-- 
Per Jessen, Zürich (4.2°C)
http://www.hostsuisse.com/ - dedicated server rental in Switzerland.



More information about the mythtv-users mailing list