explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SFk5

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.038 ↑ 1.0 1 1

Aggregate (cost=61.10..61.11 rows=1 width=8) (actual time=0.038..0.038 rows=1 loops=1)

  • Output: count(*)
2.          

CTE inactive_nodes

3. 0.003 0.003 ↓ 0.0 0 1

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

  • Output: certnames_1.certname
  • Filter: ((certnames_1.deactivated IS NOT NULL) OR (certnames_1.expired IS NOT NULL))
  • Rows Removed by Filter: 1
4. 0.013 0.036 ↑ 260.0 1 1

Hash Right Join (cost=31.45..45.25 rows=260 width=0) (actual time=0.033..0.036 rows=1 loops=1)

  • Inner Unique: true
  • Hash Cond: (catalogs.certname = certnames.certname)
5. 0.003 0.003 ↑ 300.0 1 1

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

  • Output: catalogs.certname, catalogs.environment_id
6. 0.002 0.020 ↑ 260.0 1 1

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

  • Output: certnames.certname, certnames.latest_report_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
7. 0.015 0.018 ↑ 260.0 1 1

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

  • Output: certnames.certname, certnames.latest_report_id
  • Filter: (NOT (hashed SubPlan 2))
8.          

SubPlan (for Seq Scan)

9. 0.003 0.003 ↓ 0.0 0 1

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

  • Output: inactive_nodes.certname