[mythtv] Latest MythTV CVS

Todd Tidwell artist at wildstar.net
Sun Sep 5 18:42:11 EDT 2004


I just grabbed the latest CVS of pretty much everything.  The only thing so
far I've found that I think is a bit odd is that during live TV or recorded
programs, I no longer can use the Left and Right arrow keys to jump back 10
seconds or jump forward 30.

It now goes to rewind.

Is this an intentional change or did something get accidentally pulled from
the database.  Is it possible for me to add it back in the DB by hand?

Thanks!

-Todd

-----Original Message-----
From: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org]
On Behalf Of Brian Scully
Sent: Sunday, September 05, 2004 11:18 AM
To: mythtv-dev at mythtv.org
Subject: [mythtv] FW: RE: [mythtv-users] [PATCH] Full table scan on
programtable


I sent this db patch to user instead of dev, sorry about that.

Brian

 --- On Sun 09/05, Brian Scully < brian_scully at excite.com > wrote:
From: Brian Scully [mailto: brian_scully at excite.com]
To: mythtv-users at mythtv.org
Date: Sun,  5 Sep 2004 13:36:01 -0400 (EDT)
Subject: RE: [mythtv-users] [PATCH] Full table scan on program table

<br>I've been tweaking this a bit, and i've got another perceptible boost,
although much smaller than the last one - it rids this query of all full
table scans.<br><br>ALTER TABLE channel ADD_INDEX channelnum (channum,
sourceid);<br><br>This should probably be a unique index, but i've got some
duplicate channums - maybe due to upgrades, I don't know.  I'm gonna do a
little research and maybe pull out the dupes.  Sourceid isn't necessary for
me (i've only got one source), but it's probably better to be generic in
this case.<br><br>HTH,<br>Brian<br><br> --- On Sun 09/05, Brian Scully <
brian_scully at excite.com > wrote:<br>From: Brian Scully [mailto:
brian_scully at excite.com]<br>To: mythtv-users at mythtv.org<br>Date: Sun,  5 Sep
2004 12:12:02 -0400 (EDT)<br>Subject: [mythtv-users] [PATCH] Full table scan
on program table<br><br><br>First of all, thanks to Isaac and the mythtv
community for making such a great application.  It's fundamentally changed
the way I watch TV ... for the b!
 etter.<br><br>DISCLAIMER: I am not a Database or MySQL expert.  This
solution works for me, YMMV.<br><br>I have been having lots of trouble
lately with the frontend timing out the socket connection to the backend
because it thinks that the backend dies.  This happens (almost) any time I
pull up the program guide or go into channel browse mode.  I turned on mysql
slow query logging, and did explain plans on the queries there.  The
following query takes ~13 sec on my machine:<br><br>SELECT
starttime,endtime,title,subtitle,description,category,callsign,icon,channel.
chanid, seriesid, programid <br>              FROM
program,channel,capturecard,cardinput <br>              WHERE
channel.channum = "501" <br>              AND starttime < 20040905105650
<br>              AND endtime > 20040905105650 <br>              AND
program.c!<br> hanid = channel.chanid <br>              AND channel.sourceid
= cardinput.sourceid <br>              AND cardinput.cardid =
capturecard.cardid <br>  !
             AND capturecard.cardid = "1" <br>              AND capture

card.hostname = "htpc";<br><br>The explain plan tells me that it is doing a
full table scan on the program table (~94k records) for this query.  An
index including chanid, starttime, and endtime is necessary. There are two
indexes that are close: the primary key(chanid, starttime), and an index on
endtime - but unfortunately mysql only uses one index for a query.<br><br>So
I added an index called "program_guide" including the three necessary
columns, although perhaps the mythtv maintainers would prefer to add endtime
to the primary key.<br><br>ALTER TABLE program ADD INDEX program_guide
(chanid,starttime,endtime);<br><br>With this change, the table scan has
moved to channel - but there's only 340 records in that table so there's not
much of a performance hit.!<br>   My queries have gone from 13s to <<
1s.<br><br>HTH,<br>Brian<br><br><br><br>____________________________________
___________<br>Join Excite! - http://www.excite.com<br>The most personalized
portal on the Web!<br>_!
 ______________________________________________<br>mythtv-users mailing
list<br>mythtv-users at mythtv.org<br>http://mythtv.org/cgi-bin/mailman/listinf
o/mythtv-users<br><br><br>_______________________________________________<br
>Join Excite! - http://www.excite.com<br>The most personalized portal on the
Web!<br>_______________________________________________<br>mythtv-users
mailing
list<br>mythtv-users at mythtv.org<br>http://mythtv.org/cgi-bin/mailman/listinf
o/mythtv-users<br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!




More information about the mythtv-dev mailing list