2 ms·
Btw, PostgreSQL has pg_sleep() https://www.postgresql.org/docs/current/functions-datetime.html https://www.postgresql.org/docs/current/functions-datetime.h...
by pmontra 8y ago
Btw, PostgreSQL has pg_sleep()
https://www.postgresql.org/docs/current/functions-datetime.html https://www.postgresql.org/docs/current/functions-datetime.h...
SELECT pg_sleep(1.5);
SELECT pg_sleep_for('5 minutes');
SELECT pg_sleep_until('tomorrow 03:00');
Maybe useful for debugging? https://www.endpoint.com/blog/2012/11/05/how-to-make-postgresql-query-slow https://www.endpoint.com/blog/2012/11/05/how-to-make-postgre...
- coder543 8y agoThe article seems to be saying that MySQL's sleep function pauses the entire database for the duration, whereas PostgreSQL's will just sleep that connection for the specified duration and other connections can keep working.