Turn on Query Execution Time Command

  • Hey, I am in the learning state for PostgreSQL and looking to turn on query execution command examples. I have added one example taken from this here. Can anyone tell me, Is it the right command example?

    user_ab=# \timing
    Timing is on.
    user_ab=# select count(*) from film;
    count
    -------
    1000
    (1 row)

    Time: 1.495 ms
    user_ab=#
  • this is not a postgreSQL site - you better off posting elsewhere (or read documentation).

    you may or not get a reply here.

  • frederico_fonseca wrote:

    this is not a postgreSQL site - you better off posting elsewhere (or read documentation).

    you may or not get a reply here.

    This is the PostgreSQL forum here on SSC though.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • If you're using psql for running your commands, then the yes, \timing turns on query time. After you connect with psql you can just type "\timing" and it will turn on query times. The next line in the example is the result of turning them on, not a command. Then, if you run a query, you'll get timing results.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply