View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008626 | MMW v4 | Other | public | 2011-11-04 09:02 | 2011-11-04 09:03 |
Reporter | jiri | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Product Version | 4.0 | ||||
Target Version | 4.1 | ||||
Summary | 0008626: Optimize some SQL queries | ||||
Description | As reported in http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=61584 we run very often queries like SELECT NULL FROM Songs WHERE Songs.IDFolder in (SELECT IDChildFolder FROM FoldersHier WHERE IDFolder=3) form AddSystemFolder(). We should: 1. Review whether the query isn't called unnecessarily. 2. Test whether it can be rewritten in the form suggested by user in the forum (it might be faster, but it might depend on filter used and DB size). 3. Pre-compile the query, so that its execution is faster. As for the second issue mentioned, usage of SELECT ID,TrackCount FROM Folders WHERE IDMedia=? AND IDParentFolder=? AND Folder=? seems to be correct and optimized, but we should review whether GetFolderIDOfPath() isn't sometimes called unnecessarily. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||