[mythtv] [PATCH] Split program.{start, end}time into separate date and time columns

David Engel gigem at comcast.net
Fri Mar 19 11:12:06 EST 2004


On Thu, Mar 18, 2004 at 10:27:56PM -0800, Matt Zimmerman wrote:
> Good news: this should speed up the scheduler query a lot, and probably a
> number of other things as well

I took a quick look through your patch.  I noticed two minor problems
and one more significant one.

1. In a few DB queries, you replaced "ORDER BY starttime,..." with
   "ORDER BY starttime,startdate,...".  The time and date should be
   reversed.

2. In a few DB queries, you replaced something like "WHERE
   ... starttime >= xyz" with "WHERE ...  startdate >= xyzdate AND
   starttime >= xyztime".  This should be like "WHERE ... startdate >
   xyzdate OR (startdate = xyzdate AND starttime >= xyztime)".

3. The recordoverride JOIN in AddNewRecords needs to be fixed to also
   check the date.

> Bad news: I have no way to test it as yet.  It compiles, and the db
> conversion code works correctly, but beyond that, I can make no
> guarantees.  Anyone who wants to try it must be prepared to deal with (and
> preferably fix) the breakage that awaits.

Might I suggest a more conservative, iterative approach to such a big
change.  Start by adding the split date/time as new columns without
changing the old columns and making sure the new columns get populated
in all of the appropriate places first.  Then, convert each use of the
old columns to use the new columns one at a time where they can be
tested without breaking anything else.

David
-- 
David Engel
gigem at comcast.net


More information about the mythtv-dev mailing list