Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I run the EXPLAIN ANALYZE command on a given query, I'm having a difficult time interpreting the outputted time value. For example (actual time=8163.890..8163.893). Do the internal decimals represent repeating characters?? Sorry, this may be a noobish question, but I want to make sure I'm interpreting the results correctly.

   ->  GroupAggregate  (cost=2928781.21..2929243.02 rows=1 width=27712) (actual time=8163.890..8163.893 rows=1 loops=1)
share|improve this question

2 Answers 2

up vote 4 down vote accepted

actual time=8163.890..8163.893 means

Initializing that step ("startup") took 8163.890ms
Running the whole step took 8163.893ms

So in that case nearly the complete work was done in the startup phase of that step.

Edit:
The same logic is "applied" to the cost information

cost=2928781.21..2929243.02 means:

The cost to initialize this step was estimated at: 2928781.21
The cost to perform the step was estimated at: 2929243.02

(note that "cost" does not have a unit - it's an arbitrary value)

This is also explained here: http://www.postgresql.org/docs/current/static/using-explain.html

share|improve this answer
    
Thanks for the information and the link - I also found this document helpful, albeit somewhat outdated –  Jmoney38 Sep 14 '11 at 11:59
    
Thanks for the link. The document isn't really outdated. Newer versions of PostgreSQL show more information in the plan, but the basic principles still apply. –  a_horse_with_no_name Sep 14 '11 at 12:00

The first number is how long it took to return the first row in that step. The second number is how long it took to return the last row.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.