explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kMVx

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

Finalize GroupAggregate (cost=1,184,363.44..1,184,676.46 rows=1,200 width=14) (actual time=178.965..179.023 rows=60 loops=1)

  • Group Key: (date(calendar.entry)), vulnerabilities.severity
2. 15.770 189.959 ↑ 20.0 120 1

Gather Merge (cost=1,184,363.44..1,184,643.46 rows=2,400 width=14) (actual time=178.958..189.959 rows=120 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.043 174.189 ↑ 30.0 40 3 / 3

Sort (cost=1,183,363.42..1,183,366.42 rows=1,200 width=14) (actual time=174.186..174.189 rows=40 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. 55.679 174.146 ↑ 30.0 40 3 / 3

Partial HashAggregate (cost=1,183,287.04..1,183,302.04 rows=1,200 width=14) (actual time=174.128..174.146 rows=40 loops=3)

  • Group Key: date(calendar.entry), vulnerabilities.severity
5. 64.146 118.467 ↑ 41.6 286,177 3 / 3

Nested Loop (cost=0.44..1,093,895.47 rows=11,918,876 width=6) (actual time=0.084..118.467 rows=286,177 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: 63
6. 25.697 25.697 ↑ 1.3 28,624 3 / 3

Parallel Index Scan using index_vulnerabilities_on_project_id on vulnerabilities (cost=0.43..70,633.28 rows=36,126 width=26) (actual time=0.045..25.697 rows=28,624 loops=3)

  • Index Cond: (project_id = 10,300,671)
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.206 ms
Execution time : 190.089 ms