Opened 10 years ago
Closed 9 years ago
Playback start taking ages due to slow loading of the seek table from a heavily fragmented MyISAM table
http://www.psce.com/blog/2012/07/09/data-fragmentation-problem-in-mysql-myisam/
hints that fragmented MyISAM tables can have very bad performance once the table gets to big for the memory caches.
On a backend that records and deletes recordings this will happen to the seek table.
There is a statement for live defragmentation on a running system (even in parallel to recordings)
ALTER TABLE recordedseek ORDER BY chanid, starttime;
attached is a proof of concept patch that adds the defragmentation to the daily database maintenance job after the removal of stale entries in the recordedseek table. As the query runs more then four minutes on my backend I'd prefer some testing by others before I commit this as is.
Change History (9)
Changed 10 years ago by Karl Egly
Component: |
MythTV - General →
Contributed Scripts & Apps
|
Milestone: |
unknown →
0.27.5
|
Owner: |
set to Karl Egly
|
Status: |
new →
assigned
|
Milestone: |
0.27.5 →
0.27.6
|
Changed 10 years ago by J.Pilk@…
Resolution: |
→ Fixed
|
Status: |
assigned →
closed
|
Given that this can be an extremely resource intensive process, I would recommend that it not be automatically scheduled by the BE (unless you provide the user with an extensive scheduling control and capability), but be part of an external script that performs backup, check, optimize, and analyze that can be scheduled by the user as appropriate and as required. I will also note that unless your database is "special", it is not considered necessary to perform a optimize/analyze daily (backup, on the other hand...)