coubeatczech coubeatczech - 6 months ago 13
MySQL Question

mysql deliberate slowdown

I have an Java application that connects to database. In the production environment, the dataset is very large, so the application very slow and I want to simulate (the slowness) in development environment. Is there a way, how to slowdown mysql, so the response time is bigger?

I know, that I could enlarge my test dataset, but the proccessing of the large dataset would eat processor cycles, I'm rather searching for something that would do "cheap"

sleep
s in
MySQL
.

Answer

MySQL has a SLEEP(duration) miscellaneous function, where duration is the number of seconds.

source: http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_sleep

Comments