explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cbkZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 14.506 ↑ 24.0 50 1

Finalize GroupAggregate (cost=50,341.79..50,654.81 rows=1,200 width=14) (actual time=14.458..14.506 rows=50 loops=1)

  • Group Key: (date(calendar.entry)), vulnerabilities.severity
2. 10.390 20.551 ↑ 19.4 124 1

Gather Merge (cost=50,341.79..50,621.81 rows=2,400 width=14) (actual time=14.450..20.551 rows=124 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.042 10.161 ↑ 29.3 41 3 / 3

Sort (cost=49,341.77..49,344.77 rows=1,200 width=14) (actual time=10.158..10.161 rows=41 loops=3)

  • Sort Key: (date(calendar.entry)), vulnerabilities.severity
  • Sort Method: quicksort Memory: 27kB
  • Worker 0: Sort Method: quicksort Memory: 26kB
  • Worker 1: Sort Method: quicksort Memory: 26kB
4. 1.852 10.119 ↑ 29.3 41 3 / 3

Partial HashAggregate (cost=49,265.39..49,280.39 rows=1,200 width=14) (actual time=10.102..10.119 rows=41 loops=3)

  • Group Key: date(calendar.entry), vulnerabilities.severity
5. 2.188 8.267 ↑ 46.4 9,797 3 / 3

Nested Loop (cost=50.09..45,852.71 rows=455,024 width=6) (actual time=0.322..8.267 rows=9,797 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: 1,030
6. 4.807 4.996 ↑ 1.3 1,083 3 / 3

Parallel Bitmap Heap Scan on vulnerabilities (cost=50.08..6,792.65 rows=1,379 width=26) (actual time=0.300..4.996 rows=1,083 loops=3)

  • Recheck Cond: (project_id = 278,964)
  • Heap Blocks: exact=763
7. 0.189 0.189 ↑ 1.0 3,248 1 / 3

Bitmap Index Scan on index_vulnerabilities_on_project_id (cost=0.00..49.26 rows=3,310 width=0) (actual time=0.567..0.567 rows=3,248 loops=1)

  • Index Cond: (project_id = 278,964)
8. 1.083 1.083 ↑ 100.0 10 3,248 / 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=3,248)

Planning time : 0.204 ms
Execution time : 20.664 ms