Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sometimes it is not the query itself which causes a slowdown - another query operating on the table can easily cause inserts to slow down due to transactional isolation and locking. Your slow queries might simply have been waiting for another transaction(s) to complete. This is fairly common on a busy table, or if your server is executing long/complex transactions.</p> <p>Another significant factor will be the overall performance of your database: how your <code>my.cnf</code> file is tuned, how the server itself is tuned, what else the server has running on it, and of course, what hardware the server is running.</p> <p>The linux tool <code>mytop</code> and the query <code>SHOW ENGINE INNODB STATUS\G</code> can be helpful to see possible trouble spots. General linux performance tools can also show how busy your disks are, etc.</p> <p>Given the nature of this table, have you considered an alternative way to keep track of who is online? In MySQL, I have used a <code>MEMORY</code> table for such purposes in the past. A NoSQL data store might also be good for this type of information. Redis could store this as a sorted set with much success (score == timestamp).</p> <p>Further reading:</p> <ul> <li><a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html</a></li> <li><a href="http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html</a></li> <li><a href="http://redis.io/commands#sorted_set" rel="nofollow noreferrer">http://redis.io/commands#sorted_set</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload