Welcome to my blog, hope you enjoy reading
RSS

Friday 7 March 2014

Handling multiple updates in Mysql

Handling multiple updates in Mysql 

UPDATE yourtable
    SET updatefield = CASE id
        WHEN 1 THEN 'new value'
        WHEN 2 THEN 'new value'
        WHEN 3 THEN 'new value'
    END
WHERE id IN (1,2,3)
Share

Tuesday 4 March 2014

CPU usage in ubuntu

CPU usage in ubuntu 

You first should figure out what process is eating away your CPU.
  •     open a terminal with ctrl+alt+t
  •     execute the command top
  •     note the process using the most cpu
If the process isn't a system process, kill it with sudo pkill [processname] with [processname] the name of the process you want to kill. If it is a system process, don't kill it, but try to google the name and figure out what functionality it has in Ubuntu. Then you can proceed to turn it of (in e.g. you system settings).
Share