explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CQqd

Settings
# exclusive inclusive rows x rows loops node
1. 0.658 12,659.435 ↑ 1.0 51 1

Limit (cost=84,694.98..84,695.11 rows=51 width=24) (actual time=12,658.491..12,659.435 rows=51 loops=1)

2. 261.551 12,658.777 ↑ 1,835.1 51 1

Sort (cost=84,694.98..84,928.96 rows=93,591 width=24) (actual time=12,658.476..12,658.777 rows=51 loops=1)

  • Sort Key: thread.date_updated DESC NULLS LAST, thread.id DESC NULLS LAST
  • Sort Method: top-N heapsort Memory: 28kB
3. 2,970.186 12,397.226 ↑ 2.4 39,132 1

Hash Join (cost=65,631.74..81,572.59 rows=93,591 width=24) (actual time=6,683.661..12,397.226 rows=39,132 loops=1)

  • Hash Cond: (thread_entity.thread_id = thread.id)
4. 2,743.581 2,743.581 ↑ 1.0 400,911 1

Seq Scan on thread_entity (cost=0.00..8,853.53 rows=400,911 width=16) (actual time=0.020..2,743.581 rows=400,911 loops=1)

  • Filter: (entity_type = ANY ('{MMP_ORDER,MMP_OFFER,MPS_ORDER}'::text[]))
5. 267.137 6,683.459 ↑ 2.4 39,132 1

Hash (cost=63,729.85..63,729.85 rows=93,591 width=40) (actual time=6,683.459..6,683.459 rows=39,132 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 1,900kB
6. 570.022 6,416.322 ↑ 2.4 39,132 1

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

  • Hash Cond: (thread_participant_organization.thread_id = thread.id)
7. 333.173 412.549 ↑ 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=81.428..412.549 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
8. 79.376 79.376 ↓ 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=79.376..79.376 rows=400,911 loops=1)

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

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

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

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

  • Filter: (NOT anonymized)
Planning time : 1.000 ms
Execution time : 12,659.929 ms