explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uq9P

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 169.543 ↑ 20.0 60 1

Finalize GroupAggregate (cost=1,184,824.90..1,185,137.92 rows=1,200 width=14) (actual time=169.444..169.543 rows=60 loops=1)

  • Group Key: (date(calendar.entry)), vulnerabilities.severity
2. 16.939 181.887 ↑ 24.0 100 1

Gather Merge (cost=1,184,824.90..1,185,104.92 rows=2,400 width=14) (actual time=169.380..181.887 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.061 164.948 ↑ 36.4 33 3 / 3

Sort (cost=1,183,824.88..1,183,827.88 rows=1,200 width=14) (actual time=164.945..164.948 rows=33 loops=3)

  • Sort Key: (date(calendar.entry)), vulnerabilities.severity
  • Sort Method: quicksort Memory: 27kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 26kB
4. 53.317 164.887 ↑ 36.4 33 3 / 3

Partial HashAggregate (cost=1,183,748.51..1,183,763.51 rows=1,200 width=14) (actual time=164.866..164.887 rows=33 loops=3)

  • Group Key: date(calendar.entry), vulnerabilities.severity
5. 60.087 111.570 ↑ 41.8 285,407 3 / 3

Nested Loop (cost=0.44..1,094,320.85 rows=11,923,688 width=6) (actual time=0.154..111.570 rows=285,407 loops=3)

  • Join Filter: ((vulnerabilities.created_at <= calendar.entry) AND ((vulnerabilities.dismissed_at IS NULL) OR (vulnerabilities.dismissed_at > calendar.entry)) AND ((vulnerabilities.resolved_at IS NULL) OR (vulnerabilities.resolved_at > calendar.entry)))
  • Rows Removed by Join Filter: 833
6. 22.859 22.859 ↑ 1.3 28,624 3 / 3

Parallel Index Scan using index_vulnerabilities_on_project_id on vulnerabilities (cost=0.43..70,661.62 rows=36,140 width=26) (actual time=0.056..22.859 rows=28,624 loops=3)

  • Index Cond: (project_id = XXX)
7. 28.624 28.624 ↑ 100.0 10 85,872 / 3

Function Scan on generate_series calendar (cost=0.01..10.01 rows=1,000 width=8) (actual time=0.000..0.001 rows=10 loops=85,872)

Planning time : 0.213 ms
Execution time : 182.185 ms