explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kSfJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.249 ↑ 50.0 1 1

Limit (cost=146.02..146.15 rows=50 width=171) (actual time=0.249..0.249 rows=1 loops=1)

2.          

CTE not_active_nodes

3. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on certnames certnames_1 (cost=0.00..15.20 rows=520 width=32) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((deactivated IS NOT NULL) OR (expired IS NOT NULL))
  • Rows Removed by Filter: 1
4. 0.038 0.248 ↑ 260.0 1 1

Sort (cost=130.82..131.47 rows=260 width=171) (actual time=0.248..0.248 rows=1 loops=1)

  • Sort Key: reports.end_time DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.029 0.210 ↑ 260.0 1 1

Hash Right Join (cost=92.40..122.18 rows=260 width=171) (actual time=0.204..0.210 rows=1 loops=1)

  • Hash Cond: ((reports.certname = certnames.certname) AND (reports.id = certnames.latest_report_id))
6. 0.019 0.078 ↑ 50.0 3 1

Hash Right Join (cost=43.25..71.25 rows=150 width=179) (actual time=0.075..0.078 rows=3 loops=1)

  • Hash Cond: (reports_environment.id = reports.environment_id)
7. 0.007 0.007 ↑ 1,200.0 1 1

Seq Scan on environments reports_environment (cost=0.00..22.00 rows=1,200 width=40) (actual time=0.007..0.007 rows=1 loops=1)

8. 0.004 0.052 ↑ 50.0 3 1

Hash (cost=41.38..41.38 rows=150 width=155) (actual time=0.052..0.052 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.020 0.048 ↑ 50.0 3 1

Hash Right Join (cost=13.38..41.38 rows=150 width=155) (actual time=0.043..0.048 rows=3 loops=1)

  • Hash Cond: (report_statuses.id = reports.status_id)
10. 0.008 0.008 ↑ 600.0 2 1

Seq Scan on report_statuses (cost=0.00..22.00 rows=1,200 width=40) (actual time=0.007..0.008 rows=2 loops=1)

11. 0.004 0.020 ↑ 50.0 3 1

Hash (cost=11.50..11.50 rows=150 width=131) (actual time=0.020..0.020 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
12. 0.016 0.016 ↑ 50.0 3 1

Seq Scan on reports (cost=0.00..11.50 rows=150 width=131) (actual time=0.015..0.016 rows=3 loops=1)

13. 0.003 0.103 ↑ 260.0 1 1

Hash (cost=45.25..45.25 rows=260 width=40) (actual time=0.103..0.103 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
14. 0.020 0.100 ↑ 260.0 1 1

Hash Right Join (cost=31.45..45.25 rows=260 width=40) (actual time=0.097..0.100 rows=1 loops=1)

  • Hash Cond: (catalogs.certname = certnames.certname)
15. 0.010 0.010 ↑ 300.0 1 1

Seq Scan on catalogs (cost=0.00..13.00 rows=300 width=40) (actual time=0.010..0.010 rows=1 loops=1)

16. 0.008 0.070 ↑ 260.0 1 1

Hash (cost=28.20..28.20 rows=260 width=40) (actual time=0.070..0.070 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.058 0.062 ↑ 260.0 1 1

Seq Scan on certnames (cost=11.70..28.20 rows=260 width=40) (actual time=0.062..0.062 rows=1 loops=1)

  • Filter: (NOT (hashed SubPlan 2))
18.          

SubPlan (for Seq Scan)

19. 0.004 0.004 ↓ 0.0 0 1

CTE Scan on not_active_nodes (cost=0.00..10.40 rows=520 width=32) (actual time=0.004..0.004 rows=0 loops=1)