[mythtv] Index on programrating table on system column - why?

Taco Mel taco_mel at yahoo.com
Mon Mar 3 02:50:53 UTC 2008


In trying to speed up some very slow search results, I
analyzed the search query in greater detail and played
around with table indexes a little bit.  It was
curious to find that the "programrating" table had an
index over starttime and system, when the main joins
at least in the search query are over channel ID and
starttime.  I changed the index to starttime and
chanid, dropping the time required to search for a
show by title in my setup from 22 seconds to 3.7
seconds.  Every screen in mythweb seems a lot faster
as well.

With such a significant change in speed, I have
implemented this on my system.  I removed the index
over starttime and system because I didn't see much
use for it.

My point of submitting this message is twofold.  First
I would suggest that the index be added since it
speeds up search results by 6-7 times at least in my
case.  And second, to ask if there is a good reason
for the index on the system column, so I am not
sacrificing performance somewhere else since I dropped
that index.


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


More information about the mythtv-dev mailing list