explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QRPh : Optimization for: plan #C4Sa

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.327 1,309.031 ↑ 18.4 32 1

Hash Anti Join (cost=1,775.73..141,772.98 rows=588 width=121) (actual time=1,126.225..1,309.031 rows=32 loops=1)

  • Hash Cond: (a.uuid = events.parent_id)
2. 664.274 1,308.539 ↓ 1.6 967 1

Hash Right Join (cost=887.87..140,877.69 rows=588 width=158) (actual time=121.235..1,308.539 rows=967 loops=1)

  • Hash Cond: (b.parent_id = a.uuid)
3. 643.775 643.775 ↓ 1.0 4,834,892 1

Seq Scan on events b (cost=0.00..127,298.37 rows=4,834,837 width=1) (actual time=0.084..643.775 rows=4,834,892 loops=1)

4. 0.116 0.490 ↑ 2.9 203 1

Hash (cost=880.52..880.52 rows=588 width=158) (actual time=0.489..0.490 rows=203 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 78kB
5. 0.374 0.374 ↑ 2.9 203 1

Index Scan using idx_event_type on events a (cost=0.43..880.52 rows=588 width=158) (actual time=0.029..0.374 rows=203 loops=1)

  • Index Cond: (type = 1)
6. 0.044 0.165 ↑ 3.0 194 1

Hash (cost=880.52..880.52 rows=588 width=1) (actual time=0.165..0.165 rows=194 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 22kB
7. 0.121 0.121 ↑ 3.0 194 1

Index Scan using idx_event_type on events (cost=0.43..880.52 rows=588 width=1) (actual time=0.014..0.121 rows=194 loops=1)

  • Index Cond: (type = 4)