[1452] Tagging performance - Improved SQL Query [#8626]

Beta Testing for Windows Products and plugins

Moderator: Gurus

toof4st
Posts: 65
Joined: Fri Mar 06, 2009 6:13 am

[1452] Tagging performance - Improved SQL Query [#8626]

Post by toof4st »

I have been looking at the debug log when I am tagging, via drag drop (onto a MagicNode)
I see this statement multiple times:
[6020] 6224 DB open SQL: SELECT NULL FROM Songs WHERE Songs.IDFolder in (SELECT IDChildFolder FROM FoldersHier WHERE IDFolder=3) LIMIT 1
[6020] 6224 DB lock finished, took 16296.

This would be about 10 times quicker (run using SQLViewer):
[6020] 6224 DB open SQL: SELECT NULL FROM Songs s INNER JOIN FoldersHier fh ON s.IDFolder = fh.IDChildFolder WHERE fh.IDFolder=3 LIMIT 1
[6020] 6224 DB lock finished, took 1251.

I know it won't solve the slow tagging, but every little but helps.

I would also question, why it is running the same query over and over.

I also see a huge number of these statements:
[6020] 6224 DB open SQL: SELECT ID,TrackCount FROM Folders WHERE IDMedia=? AND IDParentFolder=? AND Folder=?
[6020] 6224 DB lock finished, took 51.

Just wonder what these are all doing. Wonder if they are all required (obviously I don't know what the ? are, so can't tell if they are duplicates)
jiri
Posts: 5430
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: [1452] Tagging performance - Improved SQL Query

Post by jiri »

Hi, added the first issue to be reviewed as http://www.ventismedia.com/mantis/view.php?id=8626.

Thanks,
Jiri
Post Reply