0

Does postgres include the time taken for rendering the output on screen within \timing or explain analyze. From what I understand it does not. Am I correct?

Actually I am outputting a lot of rows on screen and I find that postgres does not take much time to display them on screen, whereas if I write a simple C program to output the results, then the C programs takes about 3000ms. Whereas postgres takes about 500ms to display the same data on screen.

1 Answer 1

1

"postgres" doesn't display anything at all. I think you mean the psql client.

If so: \timing displays time including the time to receive the data from the server. EXPLAIN ANALYZE doesn't, but adds the overhead of doing the detailed server-side timing. log_min_duration_statement just records statement timings server-side.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for answering. Can you please give an example illustrating the use of long_min statement duration. Also does long_min take into account the amount of time required to render the output on screen
@RoseBeck That should've been log_min_duration_statement. It's in the user manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.