[mythtv-commits] Ticket #4088: Add filename index to filemarkup table to speed up MythVideo db reorganization

MythTV mythtv at cvs.mythtv.org
Thu Oct 18 15:28:02 UTC 2007


#4088: Add filename index to filemarkup table to speed up MythVideo db
reorganization
------------------------------------+---------------------------------------
 Reporter:  mail at jensbaumeister.de  |       Owner:  awithers
     Type:  enhancement             |      Status:  new     
 Priority:  minor                   |   Milestone:  unknown 
Component:  mythvideo               |     Version:  unknown 
 Severity:  low                     |     Mlocked:  0       
------------------------------------+---------------------------------------
 Removing each entry for a non-existant file during the video manager's
 initialization screen takes an extremey long time (about 3-4 seconds on my
 box).

 This adds up when removing lots of entries (such as after re-organizing
 the collection)

 The delay is due to this SQL:

 DELETE FROM filemarkup WHERE filename = 'SOMENAME';

 This takes a long time, because filename is a text column. (Text lookups
 are expensive.)

 Adding an index to the filemarkup removes the bottleneck:

 ALTER TABLE `filemarkup` ADD INDEX ( `filename` ( 255 ) )

 Even with hundreds of changes, this phase of the initializaion takes only
 a few seconds now.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4088>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list