explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IiY8

Settings
# exclusive inclusive rows x rows loops node
1. 2.774 18.426 ↑ 11.1 718 1

WindowAgg (cost=16,211.77..21,319.22 rows=7,966 width=108) (actual time=12.094..18.426 rows=718 loops=1)

2. 0.943 15.652 ↑ 11.1 718 1

WindowAgg (cost=16,211.77..18,969.25 rows=7,966 width=84) (actual time=12.075..15.652 rows=718 loops=1)

3. 1.328 14.709 ↑ 11.1 718 1

Finalize GroupAggregate (cost=16,211.77..18,670.52 rows=7,966 width=44) (actual time=12.063..14.709 rows=718 loops=1)

  • Group Key: service_data.service_data_id, (time_bucket('00:05:00'::interval, service_data.measured_at))
4. 0.918 13.381 ↑ 10.0 718 1

Gather Merge (cost=16,211.77..17,401.84 rows=7,194 width=268) (actual time=12.046..13.381 rows=718 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
5. 1.028 12.463 ↑ 5.0 718 1

Partial GroupAggregate (cost=15,211.75..15,571.45 rows=3,597 width=268) (actual time=11.394..12.463 rows=718 loops=1)

  • Group Key: service_data.service_data_id, (time_bucket('00:05:00'::interval, service_data.measured_at))
6. 0.495 11.435 ↑ 5.0 718 1

Sort (cost=15,211.75..15,220.74 rows=3,597 width=268) (actual time=11.382..11.435 rows=718 loops=1)

  • Sort Key: service_data.service_data_id, (time_bucket('00:05:00'::interval, service_data.measured_at))
  • Sort Method: quicksort Memory: 215kB
7. 10.581 10.940 ↑ 5.0 718 1

Parallel Bitmap Heap Scan on service_data (cost=15.54..14,999.30 rows=3,597 width=268) (actual time=2.430..10.940 rows=718 loops=1)

  • Recheck Cond: ((service_data_id = ANY ((current_setting('snap.service_data_id'::text))::integer[])) AND (time_bucket('00:05:00'::interval, measured_at) > (current_setting('snap.from_ts'::text))::timestamp without time zone))
  • Rows Removed by Index Recheck: 14,937
  • Heap Blocks: lossy=348
8. 0.359 0.359 ↑ 32.3 7,680 1

Bitmap Index Scan on service_data_service_data_id_five_min_key (cost=0.00..13.39 rows=247,723 width=0) (actual time=0.359..0.359 rows=7,680 loops=1)

  • Index Cond: ((service_data_id = ANY ((current_setting('snap.service_data_id'::text))::integer[])) AND (time_bucket('00:05:00'::interval, measured_at) > (current_setting('snap.from_ts'::text))::timestamp without time zone))
Planning time : 1.110 ms
Execution time : 18.926 ms