DB index
#1
Hi,
I added an index on the playCount field for episodes of tvshows in my local installed xbmc 13.2 with MySql and it made it alot faster at listing them in the gui.

Perhaps it's time to take a look at the db and add indexes on more items?
Reply
#2
discuss it here: http://forum.xbmc.org/showthread.php?tid=200911
Philips TV with Kodi 20.2 with IPTV --- Orbsmart 500 Android 21 alpha/beta as Online-radio/TV in the kitchen
Reply
#3
(2014-10-27, 08:13)tommyhome Wrote: Hi,
I added an index on the playCount field for episodes of tvshows in my local installed xbmc 13.2 with MySql and it made it alot faster at listing them in the gui.

Perhaps it's time to take a look at the db and add indexes on more items?

Did you measure this before and after (and not only once)? Playcount is always retrieved with every episode independent of whether there's an index or not.

Indeces in SQL only really make sense on fields that are used to filter and/or sort the retrieved items and we don't really filter or sort on Playcount. It's possible with smartplaylists but we don't do it in the normal queries.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
(2014-10-27, 08:56)Montellese Wrote:
(2014-10-27, 08:13)tommyhome Wrote: Hi,
I added an index on the playCount field for episodes of tvshows in my local installed xbmc 13.2 with MySql and it made it alot faster at listing them in the gui.

Perhaps it's time to take a look at the db and add indexes on more items?

Did you measure this before and after (and not only once)? Playcount is always retrieved with every episode independent of whether there's an index or not.

Indeces in SQL only really make sense on fields that are used to filter and/or sort the retrieved items and we don't really filter or sort on Playcount. It's possible with smartplaylists but we don't do it in the normal queries.
Hi,
I've got one smartlist that is playCount based and it gets alot faster but also the usual overview of all tvshows in the gui got faster, I use the default skin.

The reason I added the index was my smartlist but since it also made the tvshow part of the gui faster I decided to mention it.

Before I added the index there was a delay before displaying, with the index the delay is almost gone.

I use both the android version and the pc version, since android is slower it's more visible there.
Reply
#5
so could you do some measurements removing and adding the index ?
Reply
#6
explain plan with and without the index will show any effect as well.
Reply
#7
This may become more applicable now we have the ability to add more than "top 100" views in music.

I'd be interested in the results as well.
Reply

Logout Mark Read Team Forum Stats Members Help
DB index0