explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eGkh

Settings
# exclusive inclusive rows x rows loops node
1. 1,283.033 58,210.786 ↑ 6.7 4,390,744 1

Hash Join (cost=6,382,307.72..10,492,593.46 rows=29,294,486 width=24) (actual time=38,803.781..58,210.786 rows=4,390,744 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
2. 2,372.038 56,529.366 ↑ 4.8 6,043,898 1

Merge Join (cost=6,263,048.11..10,210,804.79 rows=29,294,486 width=24) (actual time=30,200.492..56,529.366 rows=6,043,898 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
3. 23,176.003 23,176.003 ↑ 1.4 30,523,648 1

Index Scan using fk_idx_bhpx on og_question og_q (cost=0.56..3,415,341.07 rows=42,995,336 width=24) (actual time=0.017..23,176.003 rows=30,523,648 loops=1)

4. 1,971.622 30,981.325 ↑ 1.1 6,044,007 1

Sort (cost=6,254,394.99..6,270,779.58 rows=6,553,838 width=8) (actual time=30,194.621..30,981.325 rows=6,044,007 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,306kB
5. 17,337.372 29,009.703 ↑ 1.2 5,280,910 1

Bitmap Heap Scan on document_n dn (cost=962,579.32..5,512,372.44 rows=6,553,838 width=8) (actual time=12,813.776..29,009.703 rows=5,280,910 loops=1)

  • Recheck Cond: (category = 2)
  • Filter: ((d_deleted = 0) AND ((rdate)::date >= '2018-07-02'::date))
  • Rows Removed by Filter: 22,778,064
  • Heap Blocks: exact=3,888,455
6. 11,672.331 11,672.331 ↓ 1.0 28,417,227 1

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..960,940.86 rows=28,145,106 width=0) (actual time=11,672.331..11,672.331 rows=28,417,227 loops=1)

  • Index Cond: (category = 2)
7. 146.093 398.387 ↑ 1.1 919,502 1

Hash (cost=106,209.27..106,209.27 rows=1,044,027 width=8) (actual time=398.387..398.387 rows=919,502 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 44,111kB
8. 252.294 252.294 ↑ 1.1 919,502 1

Seq Scan on og_question_object og_o (cost=0.00..106,209.27 rows=1,044,027 width=8) (actual time=0.005..252.294 rows=919,502 loops=1)

Planning time : 2.160 ms
Execution time : 58,354.339 ms