What is the MYSQL Sleep Query?

A sleep query is the query that waits for the timeout to terminate

Effects of a large number of MYSQL query – sleep :

1. Increased consumption of CPU and memory resources

2.  Slowing down of server.

3. Increased downtime for websites

To overcome this issue of SQL sleep command, MySQL uses two parameters:

1. Interactive Timeout

2. Wait Timeout

MySQL database has a high volume of concurrent, long-running queries and while checking the status of connections, you might get some connections with the status- “sleep”.

To Learn in Detail about the Sleep Query in MySQL Database?