<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have just upgraded two systems to
0.19.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>On one of them MythWeb is slow to show program
listings (not recordings) and I have found out that it does 246 SQL-queries
similar (WHERE clause differs) to the following for each listing
page:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><!--StartFragment --> SELECT
program.*,<BR>
UNIX_TIMESTAMP(program.starttime) AS
starttime_unix,<BR>
UNIX_TIMESTAMP( program.endtime) AS
endtime_unix,<BR>
CONCAT(repeat('&diams;', program.stars *
'4'),<BR>
IF((program.stars * '4' * 10) %
10,<BR> <WBR>
"&frac12;", "")) AS starstring,
<BR>
IFNULL(programrating.system, "") AS
rater,<BR>
IFNULL(programrating.rating, "") AS
rating,<BR>
oldrecorded.recstatus,<BR>
channel.channum<BR>
FROM
program<BR>
LEFT JOIN programrating USING (chanid,
starttime)<BR>
LEFT JOIN
oldrecorded<BR> <WBR>
ON oldrecorded.recstatus IN (-3,
11)<BR> <WBR>
AND IF(oldrecorded.programid OR
oldrecorded.seriesid,<BR> <WBR>
oldrecorded.programid =
program.programid<BR> <WBR>
AND oldrecorded.seriesid =
program.seriesid,<BR> <WBR>
oldrecorded.title =
program.title<BR> <WBR>
AND oldrecorded.subtitle =
program.subtitle<BR> <WBR>
AND oldrecorded.description =
program.description<BR> <WBR>
)<BR>
LEFT JOIN channel ON program.chanid =
channel.chanid<BR>
WHERE program.chanid='1003' AND program.starttime = FROM_UNIXTIME('1141943100')
GROUP BY program.chanid, program.starttime<BR></DIV>
<DIV><FONT face=Arial size=2>The other system is faster to show program listings
and it only executes 29 of these queries for each page, even though it has more
channels (the first has 9 channels, the second around 100).</FONT></DIV>
<DIV><FONT face=Arial size=2>So I would like to know what this query does and/or
how I can control its execution.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Niels Dybdahl</FONT></DIV>
<DIV> </DIV></BODY></HTML>