explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xyRN

Settings
# exclusive inclusive rows x rows loops node
1. 1,576.734 55,857.127 ↑ 6.7 4,391,163 1

Hash Join (cost=6,382,626.66..10,492,955.45 rows=29,296,073 width=8) (actual time=37,138.353..55,857.127 rows=4,391,163 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
2. 2,402.266 53,898.207 ↑ 4.8 6,044,438 1

Merge Join (cost=6,263,421.37..10,211,212.29 rows=29,296,073 width=8) (actual time=29,923.584..53,898.207 rows=6,044,438 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
3. 20,731.166 20,731.166 ↑ 1.4 30,524,698 1

Index Scan using fk_idx_bhpx on og_question og_q (cost=0.56..3,415,353.07 rows=42,995,336 width=16) (actual time=0.021..20,731.166 rows=30,524,698 loops=1)

4. 2,118.749 30,764.775 ↑ 1.1 6,044,549 1

Sort (cost=6,254,767.77..6,271,153.25 rows=6,554,193 width=8) (actual time=29,918.612..30,764.775 rows=6,044,549 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,326kB
5. 19,116.684 28,646.026 ↑ 1.2 5,281,336 1

Bitmap Heap Scan on document_n dn (cost=962,662.85..5,512,702.47 rows=6,554,193 width=8) (actual time=10,944.567..28,646.026 rows=5,281,336 loops=1)

  • Recheck Cond: (category = 2)
  • Filter: ((d_deleted = 0) AND ((rdate)::date >= '2018-07-02'::date))
  • Rows Removed by Filter: 22,778,591
  • Heap Blocks: exact=3,888,668
6. 9,529.342 9,529.342 ↓ 1.0 28,418,733 1

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..961,024.30 rows=28,146,631 width=0) (actual time=9,529.342..9,529.342 rows=28,418,733 loops=1)

  • Index Cond: (category = 2)
7. 125.186 382.186 ↑ 1.1 919,513 1

Hash (cost=106,185.13..106,185.13 rows=1,041,613 width=8) (actual time=382.186..382.186 rows=919,513 loops=1)

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

Seq Scan on og_question_object og_o (cost=0.00..106,185.13 rows=1,041,613 width=8) (actual time=0.009..257.000 rows=919,513 loops=1)

Planning time : 1.877 ms
Execution time : 56,003.866 ms