Ticket #10023: 0002-Speed-up-time-search-by-factoring-out-the-descriptio.patch

File 0002-Speed-up-time-search-by-factoring-out-the-descriptio.patch, 1.5 KB (added by dekarl@…, 9 years ago)

bummer, here's the real file. Got to commit before format-patch

  • mythtv/libs/libmyth/programinfo.cpp

    From a62ecf819a3dd383bfbbfa5c728577e3f3256ec2 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@users.sourceforge.net>
    Date: Wed, 7 Sep 2011 13:36:56 +0200
    Subject: [PATCH 2/2] Speed up time search by factoring out the description into a super query.
    
    ---
     mythtv/libs/libmyth/programinfo.cpp |    5 ++++-
     1 files changed, 4 insertions(+), 1 deletions(-)
    
    diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
    index b4b73f1..010fefc 100644
    a b static bool FromProgramQuery( 
    43664366    const QString &sql, const MSqlBindings &bindings, MSqlQuery &query)
    43674367{
    43684368    QString querystr = QString(
     4369        "select program.description, sub.* from program, ("
    43694370        "SELECT DISTINCT program.chanid, program.starttime, program.endtime, "
    4370         "    program.title, program.subtitle, program.description, "
     4371        "    program.title, program.subtitle, "
    43714372        "    program.category, channel.channum, channel.callsign, "
    43724373        "    channel.name, program.previouslyshown, channel.commmethod, "
    43734374        "    channel.outputfilters, program.seriesid, program.programid, "
    static bool FromProgramQuery( 
    44004401    if (!sql.contains(" LIMIT "))
    44014402        querystr += " LIMIT 20000 ";
    44024403
     4404    querystr += " ) as sub where program.chanid=sub.chanid and program.starttime=sub.starttime";
     4405
    44034406    query.prepare(querystr);
    44044407    MSqlBindings::const_iterator it;
    44054408    for (it = bindings.begin(); it != bindings.end(); ++it)