Is MySQL currently recommended?
#1
My library (only use video) consists of 100% ISO's with locally stored .nfo and fanarts in each folder. There are currently around 200 of them and my HTPC is a core2duo with SSD. I wonder if MySQL is recommended in this scenario? I did some related searches and it seems MySQL has certain problems (lack of default indexes, some functions not working properly? etc).

Some explanation would be appreciated regarding the advantages/disadvantages of MySQL in the latest build.
Reply
#2
Hello,

I can't answer directly with regard to having all iso's as I have none. However, I do use the mysql db and highly recommend it if you need to set up multiple instances of XBMC around the house.
The only thing using the mysql db lacks is support for thumbnails. There are workarounds for this issue though.
If however, you don't really care for being able to start a video in one room and continue to watch from the stopped point, in another room, the mysql db may not matter.
There are a couple of really good threads and lots of info in those threads that should you so choose, will get your mysql db set up.

Mark
Reply
#3
For me the biggest bonus is having the library separate and centralised on my server - so I can back it up, and so that my watched/unwatched statusses are kept no matter the XBMC version I choose to use on my clients, and survives upgrades etc, withou needing to do any importing/exporting. I just create a new client, direct it to MySQl and wa la there's my whole library.

With a couple of extra indexes added to the music side of things, I see no performance loss (indeed maybe even a gain?), or any functionality loss.

For thumbnails I remote mount a folder and that seems to work a treat.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
startover Wrote:My library (only use video) consists of 100% ISO's with locally stored .nfo and fanarts in each folder. There are currently around 200 of them and my HTPC is a core2duo with SSD. I wonder if MySQL is recommended in this scenario? I did some related searches and it seems MySQL has certain problems (lack of default indexes, some functions not working properly? etc).

Some explanation would be appreciated regarding the advantages/disadvantages of MySQL in the latest build.

I have about 500 movies stored on my Windows Server and thousands of music files without any problems.

I indexed some music tables and my performance is really fast (2-3 seconds to list all artists).
Reply
#5
startover Wrote:My library (only use video) consists of 100% ISO's with locally stored .nfo and fanarts in each folder. There are currently around 200 of them and my HTPC is a core2duo with SSD. I wonder if MySQL is recommended in this scenario? I did some related searches and it seems MySQL has certain problems (lack of default indexes, some functions not working properly? etc).

Some explanation would be appreciated regarding the advantages/disadvantages of MySQL in the latest build.

If you have more than one xbmc device and want a shared library across all devices, then yes mysql is a great choice. If you only have one single xbmc device then there really is no point.
Reply
#6
TomPiXX Wrote:I have about 500 movies stored on my Windows Server and thousands of music files without any problems.

I indexed some music tables and my performance is really fast (2-3 seconds to list all artists).

I've got about 600 movies and when I go to Movies --> Actors it took around 13 minutes (4882 actors) Sad

after adding skip-name-resolve in my.ini

Code:
[mysqld]
.....
......
skip-name-resolve

and the creation of the index:

Code:
mysql> ALTER TABLE movie ADD INDEX ix_idFile(idFile);
Query OK, 681 rows affected (1.01 sec)
Records: 681  Duplicates: 0  Warnings: 0

my time change from 13 min to 6 min for 4899 actors, it's better but should be much faster I think Sad

Can you write your index table command for mysql ?
Do you use SSD ?

Everybody has the same issue ?
What are your times ?
Reply
#7
I don't see these delays at all. I've just got into my actors view and it took between 10-15 seconds and I have over 1000 movies in my db.

castortray Wrote:I've got about 600 movies and when I go to Movies --> Actors it took around 13 minutes (4882 actors) Sad

after adding skip-name-resolve in my.ini

Code:
[mysqld]
.....
......
skip-name-resolve

and the creation of the index:

Code:
mysql> ALTER TABLE movie ADD INDEX ix_idFile(idFile);
Query OK, 681 rows affected (1.01 sec)
Records: 681  Duplicates: 0  Warnings: 0

my time change from 13 min to 6 min for 4899 actors, it's better but should be much faster I think Sad

Can you write your index table command for mysql ?
Do you use SSD ?

Everybody has the same issue ?
What are your times ?
Reply
#8
prae5 Wrote:I don't see these delays at all. I've just got into my actors view and it took between 10-15 seconds and I have over 1000 movies in my db.

Shocked
how did you do that ?
Are you use SSD ? Where you have MySQL installed ?

Mine is on Windows 7 (ASRock ION 330HT)
Reply
#9
castortray Wrote:Shocked
how did you do that ?
Are you use SSD ? Where you have MySQL installed ?

Mine is on Windows 7 (ASRock ION 330HT)

I have a delay issue as well with my music library (over 27+ songs). Though no where near the delay as casortray, it does take about 5-8 seconds for xbmc to list all of my artists (4k+). I think my issue is my choice of pcs (Acer 3700 and Ztac nd-22). Perhaps these are just too underpowered to quickly scan large libraries? I noticed that casortray also uses an Atom based machine. Maybe this is the issue?
Reply
#10
tboooe Wrote:I have a delay issue as well with my music library (over 27+ songs). Though no where near the delay as casortray, it does take about 5-8 seconds for xbmc to list all of my artists (4k+). I think my issue is my choice of pcs (Acer 3700 and Ztac nd-22). Perhaps these are just too underpowered to quickly scan large libraries? I noticed that casortray also uses an Atom based machine. Maybe this is the issue?

I use thumbnails on a nfs share (permanent symlink to Thumbnails on each clients). My library is separated nfo ,tbn and -fanart.jpg files per movie.
Reply
#11
castortray Wrote:I've got about 600 movies and when I go to Movies --> Actors it took around 13 minutes (4882 actors) Sad

after adding skip-name-resolve in my.ini

Code:
[mysqld]
.....
......
skip-name-resolve

and the creation of the index:

Code:
mysql> ALTER TABLE movie ADD INDEX ix_idFile(idFile);
Query OK, 681 rows affected (1.01 sec)
Records: 681  Duplicates: 0  Warnings: 0

my time change from 13 min to 6 min for 4899 actors, it's better but should be much faster I think Sad

Can you write your index table command for mysql ?
Do you use SSD ?

Everybody has the same issue ?
What are your times ?

I had the same issue but was able to fix it.

You should use an IP in your advancedsettings, not the DNS Name.

Here's my my.ini

Code:
[client]
host        = .
port        = 3306
socket        = "MySQL"

[mysqld]
basedir                 = "C:/xampplite/mysql/"
datadir                 = "C:/xampplite/mysql/data/"
port                    = 3306
socket                    = "MySQL"
skip-locking
key_buffer              = 16M
max_allowed_packet      = 1M
table_cache             = 64
sort_buffer_size        = 512K
net_buffer_length       = 8K
read_buffer_size        = 256K
read_rnd_buffer_size    = 512K
myisam_sort_buffer_size = 8M

default-time-zone       = "Europe/Berlin"

log_error           = "C:/xampplite/mysql/data/mysql.err"
pid_file            = "mysql.pid"
general_log         = 0
general_log_file    = "C:/xampplite/mysql/data/mysql.log"
slow_query_log      = 0
slow_query_log_file = "C:/xampplite/mysql/data/mysql-slow.log"

enable-named-pipe
skip-federated
server-id = 1
tmpdir             = "C:/xampplite/tmp/"
innodb_data_home_dir            = "C:/xampplite/mysql/data/"
innodb_data_file_path           = ibdata1:10M:autoextend
innodb_log_group_home_dir       = "C:/xampplite/mysql/data/"
innodb_buffer_pool_size         = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size            = 5M
innodb_log_buffer_size          = 8M
innodb_flush_log_at_trx_commit  = 1
innodb_lock_wait_timeout        = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

And the SQL query (music db):

Code:
CREATE INDEX idAlbum_idx ON song(idAlbum);
CREATE INDEX idArtist_idx ON song(idArtist);
CREATE INDEX idArtist_idx ON album(idArtist);
CREATE INDEX idArtist_idx ON exartistsong(idArtist);
CREATE INDEX idArtist_idx ON exartistalbum(idArtist);

Exactly 4 seconds to list 4793 artists (music db)
2 seconds to list 203 genres (music db)

Less than 1 second to list 43 genres (movie db)
8 seconds to list 19239 actors (movie db)

Hope this helps

Intel Core i5 (not sure which one)
4 GB DDR3 RAM
320 GB WD Caviar Green Edition
GB-LAN
MySQL runs on a Windows 2008 R2 Server
Reply
#12
Why did the sql indexes not get added into the 10.1 build since they have been known about and would seem really simple to add in? Is there a reason not to add them?
Reply
#13
Don't know. But they're a performance boost.
Reply
#14
I personally do not recommend MySQL for the simple reason that it's not user-friendly. Not only are thumbnails not shared (so you have to setup some sort of rsync or use a network share which slows things down) but also you have to have the paths common to each machine. In addition, many of the main developers that work in the database area (eg me) do not use it and thus mysql support can, has and will continue to break from time to time (though hopefully less frequently).

If you have a dedicated machine that you can leave XBMC running on, even if minimized (your "server" machine) then I suggest you check out using UPnP to share your XBMC library to the clients. It may not give everything you're after, but it makes a lot more sense than trying to replicate things across multiple clients. Take a look at it and see what works and what doesn't. Let us know and we will improve it until it does all you need.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#15
jmarshall Wrote:If you have a dedicated machine that you can leave XBMC running on, even if minimized (your "server" machine) then I suggest you check out using UPnP to share your XBMC library to the clients. It may not give everything you're after, but it makes a lot more sense than trying to replicate things across multiple clients. Take a look at it and see what works and what doesn't. Let us know and we will improve it until it does all you need.

Cheers,
Jonathan

Hi Jonathan

Can you expand on this - do you mean run XBMC on the server and it can share it's library to other XBMC's on the network via uPnP?? I was not aware XBMC did uPnP serving? Does this offer syncing of watched status? Thumbs?

Interesting idea but MySQL actually works pretty well in all, as does an NFS share for thumbs - I don't really notice it slowing down (I thinkl maybe there's a local cache with dds or something??). I know it seems hard to set up but I bet someone could knock up a little installer+script to ease the process....and if you do have multiple machines, once done, it's very nice in use with everything all synced up.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Is MySQL currently recommended?0