DB - SQLLite/MySQL - Performance issues - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: DB - SQLLite/MySQL - Performance issues (/showthread.php?tid=199805) |
RE: DB - SQLLite/MySQL - Performance issues - RockerC - 2014-07-28 (2014-07-26, 12:33)m.savazzi Wrote: I think I will propose a slightly different approach that should be more flexible and future proof. Also I'm looking at one db for everything not just the video partSince this is now really a different scope than your original post you should probably start over with a new thread instead of continuing here, as I bet you will get more more attention with a such new thread with a better subject topic description that simply doesn't involve small performance optimizations. Oh, and with RetroPlayer being mainlined sooner or later might as well consider adding stand-alone games and game ROMs launched via emulators into the scope of the database model right away as well. Would also be nice if music and music videos could be combined, or at least linked and share information. Just like movies and tv shows / episodes could be linked, or how movies and movie soundtracks could be linked. And how actors / actresses and movies / tv shows / episodes are linked today. RE: DB - SQLLite/MySQL - Performance issues - m.savazzi - 2014-07-29 (2014-07-28, 15:58)RockerC Wrote: Since this is now really a different scope than your original post you should probably start over with a new thread instead of continuing here, as I bet you will get more more attention with a such new thread with a better subject topic description that simply doesn't involve small performance optimizations. Done! new thread: http://forum.xbmc.org/showthread.php?tid=200911 RE: DB - SQLLite/MySQL - Performance issues - m.savazzi - 2014-08-01 some interesting data: Code: 22:09:30 T:10908 DEBUG: CVideoDatabase::RunQuery took 2137 ms for 13169 items query: select * from episodeview WHERE ((episodeview.playCount IS NULL OR episodeview.playCount < 1)) RE: DB - SQLLite/MySQL - Performance issues - Tolriq - 2014-08-01 Another one that I forget to post too 11:04:31 T:3580 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", "season", "episode", "showtitle", "plot", "file", "rating", "resume", "tvshowid", "art", "streamdetails", "firstaired", "runtime"], "limits": {"end": 20}, "sort": {"method": "random" }, "filter": {"field": "playcount", "operator": "lessthan", "value": "1"}}} 11:04:51 T:3580 DEBUG: CVideoDatabase::RunQuery took 19254 ms for 23367 items query: select * from episodeview WHERE ((episodeview.playCount IS NULL OR episodeview.playCount < 1)) It seems the widget ask for 20 items but the query does not have limits and as such is very very slow since I suppose playcount is not indexed |