Query execution - the beginning of the upper step does not overlap with the completion of the lower step

I look at the Postgres query plan and I noticed that the start time of the top step does not overlap with the lower step end time, so I wonder where the space has been spent?

Field name

has been edited for this request.

As you can see below, there are 2 steps in an executer request. The bottom step, "Index Scan," ends at 5730.776 (actual time), but the initial step starts at 19199.316 (actual time). My question is: what happened between 5730.776 and 19199.316?

postgres 9.1

explain analyze select a_id,b_id,c_id,d_id,e_id,mydate, f,sum(used) used
from report A where mydate >= '2013-05-01' and mydate  <= '2013-08-30'
group by a_id,b_id,c_id,d_id,e_id,date,f;
                                                                                                      QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 HashAggregate  (cost=412378.59..418074.28 rows=569569 width=70) (actual time=**19199.316**..25518.672 rows=4935988 loops=1)
   ->  Index Scan using report_dateonly_idx on report a  (cost=0.00..298464.83 rows=5695688 width=70) (actual time=0.033..**5730.776** rows=5816028 loops=1)
         Index Cond: ((date >= '2013-05-01 00:00:00'::timestamp without time zone) AND (date <= '2013-08-30 00:00:00'::timestamp without time zone))
 Total runtime: 29148.500 ms
+4
source share
2 answers

.

, /. , () / , /, .

Depesz , "cost = 22.88..23.61" - , , - ; , .

, 19199.316 , HashAggregate t = 19199.316, , t = 19199.316 HashAggregate, .

, HashAggregate , , t = 0,033; t = 5730,776, Index Scan , HashAggregate . t = 19199.316 HashAggregate ( ), t = 25518.672 .

Depezs , ; . , HashAggregate " " 19787.896 - , , , .

+4

: :

HashAggregate  (cost=412378.59..418074.28 rows=569569 width=70) (actual time=**19199.316**..25518.672 rows=4935988 loops=1)
 [expected] -----------------------------------^^^^^^       [actual rows found] > ------------------------ ^^^^^^^

-, , work_mem. , , workmem, .

: . .

+1

All Articles