explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iNbj

Settings
# exclusive inclusive rows x rows loops node
1. 0.664 6,694.722 ↑ 1.0 51 1

Limit (cost=66,852.24..66,852.37 rows=51 width=24) (actual time=6,693.658..6,694.722 rows=51 loops=1)

2. 259.166 6,694.058 ↑ 1,835.1 51 1

Sort (cost=66,852.24..67,086.22 rows=93,591 width=24) (actual time=6,693.643..6,694.058 rows=51 loops=1)

  • Sort Key: thread.date_updated DESC, thread.id DESC
  • Sort Method: top-N heapsort Memory: 28kB
3. 568.355 6,434.892 ↑ 2.4 39,132 1

Hash Join (cost=35,550.58..63,729.85 rows=93,591 width=24) (actual time=5,568.257..6,434.892 rows=39,132 loops=1)

  • Hash Cond: (thread_participant_organization.thread_id = thread.id)
4. 300.853 369.094 ↑ 2.4 39,132 1

Bitmap Heap Scan on thread_participant_organization (cost=8,146.09..31,774.48 rows=93,591 width=16) (actual time=70.395..369.094 rows=39,132 loops=1)

  • Recheck Cond: ((organization_id = '8bc90562-4eeb-4c7b-8207-ad38c5e43331'::text) AND (organization_type = 'OPERATOR'::text))
  • Filter: has_contributed
  • Rows Removed by Filter: 361,779
  • Heap Blocks: exact=11,543
5. 68.241 68.241 ↓ 3.0 400,911 1

Bitmap Index Scan on idx_thread_participant_participant_id_participant_type (cost=0.00..8,122.69 rows=134,226 width=0) (actual time=68.241..68.241 rows=400,911 loops=1)

  • Index Cond: ((organization_id = '8bc90562-4eeb-4c7b-8207-ad38c5e43331'::text) AND (organization_type = 'OPERATOR'::text))
6. 2,753.105 5,497.443 ↑ 1.0 400,911 1

Hash (cost=20,043.11..20,043.11 rows=400,911 width=24) (actual time=5,497.443..5,497.443 rows=400,911 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,247kB
7. 2,744.338 2,744.338 ↑ 1.0 400,911 1

Seq Scan on thread (cost=0.00..20,043.11 rows=400,911 width=24) (actual time=0.068..2,744.338 rows=400,911 loops=1)

Planning time : 0.361 ms
Execution time : 6,695.173 ms