explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aOJf

Settings
# exclusive inclusive rows x rows loops node
1. 4,486.709 5,902.519 ↑ 2.5 6,277 1

Hash Join (cost=2,010,879.42..2,161,868.69 rows=15,459 width=32) (actual time=1,416.351..5,902.519 rows=6,277 loops=1)

  • Hash Cond: (pc.candidate_id = c.candidate_key)
2. 6.831 9.163 ↓ 1.0 28,057 1

Bitmap Heap Scan on position_candidate pc (cost=528.11..3,106.42 rows=27,831 width=20) (actual time=2.615..9.163 rows=28,057 loops=1)

  • Recheck Cond: (rejected_date IS NOT NULL)
  • Heap Blocks: exact=1676
3. 2.332 2.332 ↓ 1.0 28,057 1

Bitmap Index Scan on position_candidate_rejected_timestamp__idx (cost=0.00..521.15 rows=27,831 width=0) (actual time=2.332..2.332 rows=28,057 loops=1)

  • Index Cond: (rejected_date IS NOT NULL)
4. 109.670 1,406.647 ↑ 744.2 27,356 1

Hash (cost=1,616,718.92..1,616,718.92 rows=20,357,551 width=28) (actual time=1,406.647..1,406.647 rows=27,356 loops=1)

  • Buckets: 65536 Batches: 512 Memory Usage: 524kB
5. 31.915 1,296.977 ↑ 744.2 27,356 1

Hash Join (cost=21.85..1,616,718.92 rows=20,357,551 width=28) (actual time=3.568..1,296.977 rows=27,356 loops=1)

  • Hash Cond: (c.user_id = ua.id)
6. 22.950 1,264.892 ↑ 97.7 373,321 1

Subquery Scan on c (cost=0.00..1,519,339.65 rows=36,467,844 width=12) (actual time=0.178..1,264.892 rows=373,321 loops=1)

  • Filter: (c.user_id IS NOT NULL)
7. 286.367 1,241.942 ↑ 98.2 373,321 1

Result (cost=0.00..1,152,828.65 rows=36,651,100 width=12) (actual time=0.176..1,241.942 rows=373,321 loops=1)

8. 567.324 955.575 ↑ 98.2 373,321 1

ProjectSet (cost=0.00..236,551.15 rows=36,651,100 width=40) (actual time=0.167..955.575 rows=373,321 loops=1)

9. 388.251 388.251 ↑ 1.0 366,126 1

Seq Scan on candidate (cost=0.00..48,714.26 rows=366,511 width=58) (actual time=0.136..388.251 rows=366,126 loops=1)

  • Filter: (candidate_owner_json IS NOT NULL)
  • Rows Removed by Filter: 26077
10. 0.035 0.170 ↑ 1.0 139 1

Hash (cost=20.11..20.11 rows=139 width=20) (actual time=0.170..0.170 rows=139 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
11. 0.135 0.135 ↑ 1.0 139 1

Seq Scan on user_account ua (cost=0.00..20.11 rows=139 width=20) (actual time=0.018..0.135 rows=139 loops=1)

  • Filter: ((deleted_timestamp IS NULL) AND (id <> '-10'::integer))
  • Rows Removed by Filter: 110