explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ow9b

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 14,918.536 ↑ 1.0 1 1

Finalize Aggregate (cost=1,142,804.05..1,142,804.06 rows=1 width=8) (actual time=14,918.535..14,918.536 rows=1 loops=1)

2. 23.190 14,927.080 ↓ 1.5 3 1

Gather (cost=1,142,803.84..1,142,804.05 rows=2 width=8) (actual time=14,918.526..14,927.080 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.083 14,903.890 ↑ 1.0 1 3 / 3

Partial Aggregate (cost=1,141,803.84..1,141,803.85 rows=1 width=8) (actual time=14,903.890..14,903.890 rows=1 loops=3)

4. 0.987 14,903.807 ↑ 2.2 160 3 / 3

Hash Join (cost=190.52..1,141,802.95 rows=354 width=4) (actual time=686.520..14,903.807 rows=160 loops=3)

  • Hash Cond: (sd.cid = c.id)
5. 14,900.684 14,900.684 ↑ 1.2 2,485 3 / 3

Parallel Seq Scan on settlement_distributions sd (cost=0.00..1,141,604.52 rows=3,010 width=8) (actual time=19.179..14,900.684 rows=2,485 loops=3)

  • Filter: (emailed_on IS NULL)
  • Rows Removed by Filter: 4,879,815
6. 0.088 2.136 ↓ 1.0 492 3 / 3

Hash (cost=184.46..184.46 rows=485 width=4) (actual time=2.136..2.136 rows=492 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 26kB
7. 2.048 2.048 ↓ 1.0 492 3 / 3

Seq Scan on clients c (cost=0.00..184.46 rows=485 width=4) (actual time=0.117..2.048 rows=492 loops=3)

  • Filter: (database_id = ANY ('{516,411,480,535,742,789,1086,887}'::integer[]))
  • Rows Removed by Filter: 3,640
Planning time : 12.538 ms
Execution time : 14,927.196 ms