Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Jul 28th, 2010 | Syntax: None | Size: 3.10 KB | Hits: 26 | Expires: Never
Copy text to clipboard
  1. # Time: 100728 15:06:41
  2. # User@Host: root[root] @ localhost []
  3. # Query_time: 23.345524  Lock_time: 0.000038 Rows_sent: 15923  Rows_examined: 210371
  4. SET timestamp=1280344001;
  5. SELECT DISTINCT     c.chanid,         c.sourceid,           p.starttime,           p.endtime,        p.title,              p.subtitle,            p.description,    c.channum,            c.callsign,            c.name,           oldrecduplicate,      p.category,            sched_temp_record.recpriority, sched_temp_record.dupin,   recduplicate,          findduplicate,    sched_temp_record.type,        sched_temp_record.recordid,     p.starttime - INTERVAL sched_temp_record.startoffset     minute AS recstartts,     p.endtime + INTERVAL sched_temp_record.endoffset     minute AS recendts,                                             p.previouslyshown,     sched_temp_record.recgroup, sched_temp_record.dupmethod,  c.commmethod,          capturecard.cardid, cardinput.cardinputid,p.seriesid,          p.programid,      p.category_type,      p.airdate,             p.stars,          p.originalairdate,    sched_temp_record.inactive,     sched_temp_record.parentid, (CASE sched_temp_record.type   WHEN 6    THEN sched_temp_record.findid   WHEN 9    THEN to_days(date_sub(p.starttime, interval                 time_format(sched_temp_record.findtime, '%H:%i') hour_minute))   WHEN 10    THEN floor((to_days(date_sub(p.starttime, interval                time_format(sched_temp_record.findtime, '%H:%i') hour_minute)) -                sched_temp_record.findday)/7) * 7 + sched_temp_record.findday   WHEN 7    THEN sched_temp_record.findid   ELSE 0  END) , sched_temp_record.playgroup,    oldrecstatus.recstatus, oldrecstatus.reactivate,                                             p.videoprop+0,         p.subtitletypes+0, p.audioprop+0,   sched_temp_record.storagegroup,     capturecard.hostname, recordmatch.oldrecstatus,                                            sched_temp_record.avg_delay, c.recpriority + cardinput.recpriority + (cardinput.cardinputid = sched_temp_record.prefinput) * 2 + (p.hdtv > 0 OR FIND_IN_SET('HDTV', p.videoprop) > 0) * 1 + (cardinput.cardinputid = 2 AND
  6. (
  7. c.callsign like 'HBO%'
  8. or
  9. c.callsign like 'SHO%'
  10. or
  11. c.callsign = 'COMEDY'
  12. or
  13. c.callsign = 'IFC'
  14. or
  15. c.callsign = 'TVONE'
  16. or
  17. c.callsign = 'LOGO'
  18. or
  19. c.callsign = 'BET'
  20. or
  21. c.callsign = 'HISTORY'
  22. or
  23. c.callsign = 'TOON'
  24. or
  25. c.callsign = 'G4'
  26. or
  27. c.channum = '209'
  28. or
  29. c.callsign = 'FX'
  30. or
  31. c.channum = '110'
  32. or
  33. c.channum = '372'
  34. )) * 10 AS powerpriority FROM recordmatch INNER JOIN sched_temp_record ON (recordmatch.recordid = sched_temp_record.recordid) INNER JOIN program AS p ON ( recordmatch.chanid    = p.chanid    AND      recordmatch.starttime = p.starttime AND      recordmatch.manualid  = p.manualid ) INNER JOIN channel AS c ON ( c.chanid = p.chanid ) INNER JOIN cardinput ON (c.sourceid = cardinput.sourceid) INNER JOIN capturecard ON (capturecard.cardid = cardinput.cardid) LEFT JOIN oldrecorded as oldrecstatus ON ( oldrecstatus.station   = c.callsign  AND      oldrecstatus.starttime = p.starttime AND      oldrecstatus.title     = p.title ) ORDER BY sched_temp_record.recordid DESC;