SQL processing very slow for approx 700 movies
#1
Hi,

I was wondering if somebody could help. I have a QNAP 410 which stores my movies, TV series. I also have mySQL installed on it so I can use one database. When I setup XBMC to use the remote database I get very low response when going to the Movie section:

20:50:45 T:3079346048 M:2807828480 DEBUG: Time for actual SQL query = 1123
20:50:49 T:3079346048 M:2806939648 DEBUG: Time to retrieve movies from dataset = 3855

I had also mySQL installed on my quad-core Atom 1.6Ghz server to see if that helps but get same times.

These times are same on my laptop (Thinkpad T410i, quad-core 2.4Ghz) and desktop (Intel i7 1.8Ghz)

[Edit] Forgot to mention, there are 682 movies in the database.

Any help or tips would be appreciated.
Reply
#2
Try doing the following
1. You'll need to find the MySQL config file (usually /etc/my.cnf or /etc/my.cfg) and add in the following
Quote:skip-name-resolve
skip-external-locking

Also, if you have a Music Library, run the following queries on the Music DB in phpMyAdmin

Code:
CREATE INDEX test_idx ON song(idAlbum);
Code:
CREATE INDEX idAlbum_idx ON song(idAlbum);
Code:
CREATE INDEX idArtist_idx ON song(idArtist);
Code:
CREATE INDEX idArtist_idx ON album(idArtist);
Code:
CREATE INDEX idArtist_idx ON exartistsong(idArtist);
Code:
CREATE INDEX idArtist_idx ON exartistalbum(idArtist);
Code:
alter table song add index idArtist(idArtist);
Code:
alter table song add index idGenre(idGenre);
Reply
#3
I had some slow down issues despite the creation of indewes, the reason was that I had never maintained the database (the equivalent or computing statistics in Oracle), and my library was frequently updated. To maintain a mysql database, see http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html.

After this, no problem at all!

V.
Reply
#4
I have made the change in my.cnf but still have very slow data processing:

21:01:46 T:3078276992 M:2750255104 DEBUG: Time for actual SQL query = 1039
21:01:50 T:3078276992 M:2749124608 DEBUG: Time to retrieve movies from dataset = 3967

So it takes about 5 seconds, which is bit long to look at a static screen. That the query takes 1 second I don't mind, but why does the processing (what I assume is the second stage) take 4 seconds.

This is for a database with 717 movies

The series responds within 1 second, with 1321 entries.
Reply

Logout Mark Read Team Forum Stats Members Help
SQL processing very slow for approx 700 movies0