Sleeping
Generally you want your SQL statements to run against your database as quickly as possible. For those times when you are doing some sort of debugging or just want your queries to look very computationally expensive, PostgreSQL offers the pg_sleep
function.
To sleep for 5 seconds, try the following:
As you'll notice, the pg_sleep
statement took about 5 seconds.
Last updated