Skip to content

Instantly share code, notes, and snippets.

When Load QPS Slow Se/In/Up/De% QCacheHit KCacheHit BpsIn BpsOut
Now 49.51 3.88 0 0/ 0/ 0/ 0 0.00% 100.00% 170.88 25.42k
Total 0.00 13.99 229 24/ 0/23/ 0 0.00% 100.00% 468.90 4.51k
Cmd ID State User Host DB Time Query
Query 48 Sending data root localhost userdump 18:03 select id from users where dumper = 0 limit 1 for update
Query 47 Sending data root localhost userdump 16:40 select id from users where dumper = 0 limit 1 for update
Query 44 Sending data root localhost userdump 14:27 select id from users where dumper = 0 limit 1 for update
Query 77 Sending data root localhost userdump 09:42 select id from users where dumper = 0 limit 1 for update
Query 65 Sending data root localhost userdump 09:37 select id from users where dumper = 0 limit 1 for update
user_id = mysql.query('select id from users where dumper = 0 limit 1 for update').first #Sets the user_id to 5 for example
mysql.query("update users set dumper = 1 where id = #{user_id}") #Updates the found user
Hello <%= @user.first_name %>
You have requested to change your e-mail to this one. To confirm the change, go to:
<%= confirmation_url(:username => @user.username, :confirmation_code => @user.new_email_code)%>