query-plan-1243

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
194044.355 100.00%
 Sort (cost=1193786.62..1193786.98 rows=144 width=16) (actual time=194044.074..194044.355 rows=353 loops=1)
   Sort Key: (date_trunc('week'::text, measurement.measurement_date))
   Sort Method:  quicksort  Memory: 41kB
194043.325 100.00%
   -> HashAggregate (cost=1193779.29..1193781.45 rows=144 width=16) (actual time=194042.151..194043.325 rows=353 loops=1)
190936.250 98.40%
         -> Nested Loop (cost=146745.28..1189953.12 rows=765235 width=16) (actual time=45163.017..190936.250 rows=630830 loops=1)
0.030 0.00%
               -> Seq Scan on sensor_station (cost=0.0..1.31 rows=1 width=4) (actual time=0.018..0.030 rows=1 loops=1)
                     Filter: (sensor_station_key = 1)
188350.193 97.07%
               -> Nested Loop (cost=146745.28..1180386.37 rows=765235 width=20) (actual time=45162.960..188350.193 rows=630830 loops=1)
0.017 0.00%
                     -> Index Scan using meas_type_dtl_pkey on meas_type_dtl (cost=0.0..8.27 rows=1 width=4) (actual time=0.011..0.017 rows=1 loops=1)
                           Index Cond: (meas_type_dtl_key = 1003)
186826.485 96.28%
                     -> Bitmap Heap Scan on measurement (cost=146745.28..1172725.75 rows=765235 width=24) (actual time=45162.939..186826.485 rows=630830 loops=1)
                           Recheck Cond: (measurement.meas_type_dtl_key = 1003)
                           Filter: (measurement.sensor_station_key = 1)
45114.902 23.25%
                           -> Bitmap Index Scan on meas_meas_type_dtl_idx (cost=0.0..146553.97 rows=9002765 width=0) (actual time=45114.902..45114.902 rows=8797136 loops=1)
                                 Index Cond: (measurement.meas_type_dtl_key = 1003)
Run-time
3 minutes 14.045048 seconds (194045.048 ms)