Opened 12 years ago

Closed 12 years ago

#4088 closed enhancement (fixed)

Add filename index to filemarkup table to speed up MythVideo db reorganization

Reported by: mail@… Owned by: Anduin Withers
Priority: minor Milestone: unknown
Component: mythvideo Version: unknown
Severity: low Keywords:
Cc: Ticket locked: no

Description

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.

Change History (1)

comment:1 Changed 12 years ago by Anduin Withers

Resolution: fixed
Status: newclosed

(In [14739]) Closes #4088

Adds an index on filemarkup.filename. Thanks to mail a jensbaumeister d de for the patch.

Note: See TracTickets for help on using tickets.