Skip to content

Instantly share code, notes, and snippets.

@JeromeParadis
Last active December 28, 2015 10:29
Show Gist options
  • Save JeromeParadis/7487184 to your computer and use it in GitHub Desktop.
Save JeromeParadis/7487184 to your computer and use it in GitHub Desktop.
Stress test a MySQL database to create more read locks on a specific table
mysqlslap --delimiter=";" --create-schema=my_db --user=root --query="SELECT * FROM app_table" --concurrency=100 --iterations=20
# Ref: http://serverfault.com/questions/285547/how-can-artificially-create-a-slow-query-in-mysql
# Ref: http://dev.mysql.com/doc/refman/5.1/en/mysqlslap.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment