[mythtv] SELECT where RecordChanged... once a second

Matt Zimmerman mdz at debian.org
Sat Aug 30 16:07:21 EDT 2003


On Fri, Aug 29, 2003 at 02:46:27PM -0500, Kirby Vandivort wrote:

> Realistically, I'd hypothesize that, on average, 'record' actually 
> changes slightly more than once per day (assuming you have your cron
> set up to grab new data once a day).  Definitely the primary time
> it would change is when you get new data, and the only other times
> would be when a user actually modified their record list..  Which,
> in reality really doesn't happen all that often.. (more when you
> are first starting with myth, of course  :)
> 
> So, we have an event that is occuring, let's say twice or three times
> a day on average, and we are checking for it 86,400 times.
> 
> Again, I'm just thinking out loud here..  What if we had 6543 listening
> for a command to recheck 'record'?  Then, when something actually changed
> the record table it would ping 6543 with a note saying that it had done
> it.. (a poor man's callback, if you will)

Some kind of asynchronous notification would be the right approach, yes.

> (
> Another suggestion for those of you running mysql 4+..  Turn on caching.
> It can effectively prevent disk hits for those selects..  Add something
> like:
> 
> # set the cache to 8 megs
> query_cache_size = 8M
> query_cache_type = 1
> 
> to your [mysqld] section of my.cnf.
> )

For those of us with a spare 4k or so of memory that can be used for disk
cache, this will always be in memory anyway.  The only disk hit would be for
writing the query log (if enabled).  Does this configuration change prevent
the query from being logged either?

-- 
 - mdz


More information about the mythtv-dev mailing list