LinuxMCE Forums
May 22, 2013, 10:22:50 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: [SOLVED] - UpdateMedia mysql queries takes 100% CPU on a core - is that normal ?  (Read 3342 times)
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #30 on: November 19, 2009, 09:18:00 pm »

It almost looks like the long list of PK_Files is the subset of media files of the particular MediaType that the data grid is to be for. eg all the media files of "LinuxMCE Video File" type, so the query only returns video files.

That doesn't seem very efficient (intuition only here!). If that is the purpose wouldn't it have been better to have used the EK_MediaType key in the pluto_media.File table and just use a normal matching Where clause?

Or is that set of PK_Files something else entirely? hmmm.... perhaps it is the subset of files it has determined are currently "available" based on which media sources are currently online/connected to the LMCE network?
Logged
Viking
Addicted
*
Posts: 521


View Profile
« Reply #31 on: November 19, 2009, 09:23:55 pm »

Someone will have to dig the code to find out Wink

Viking
Logged

phenigma
wants to work for LinuxMCE
**
Posts: 779


View Profile
« Reply #32 on: February 19, 2010, 10:31:23 pm »

So I'd been unhappy with my queries performances following a re-install in January and it turns out the indexes built in this thread are not being applied to new installations.  I have added at least one more index now which has added another significant speed-up to some of my queries and I've made some adjustments to query_cache which have also significantly sped-up some of my queries and reduced the load on my core.  I'm hopefully going to wrap this all up on a dev system and submit a patch in about 1.5 weeks (when I have a week off). 

There has been some discussion in IRC about optimizations regarding the video query after doing tv episode tagging. 

Has anyone else figured out any other optimizations during their playing?  I'd love to incorporate anything/everything I can.

J.
Logged

Viking
Addicted
*
Posts: 521


View Profile
« Reply #33 on: February 22, 2010, 09:27:21 am »

Sounds good Smiley looking forward to that.

I had no time looking further into this. But it feels as if the queries has gone slower again Sad - probably beacuse I have added more videos and pictures.

Viking
Logged

Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!