explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NcrF

Settings
# exclusive inclusive rows x rows loops node
1. 2,388.390 60,236.996 ↑ 1.0 1 1

Aggregate (cost=11,784,503.43..11,784,503.44 rows=1 width=48) (actual time=60,236.996..60,236.996 rows=1 loops=1)

2. 1,434.769 57,848.606 ↑ 6.7 4,391,181 1

Hash Join (cost=6,502,328.80..10,612,658.55 rows=29,296,122 width=34) (actual time=38,983.382..57,848.606 rows=4,391,181 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
3. 2,515.022 55,255.260 ↑ 4.8 6,044,459 1

Merge Join (cost=6,263,435.06..10,211,226.66 rows=29,296,122 width=16) (actual time=31,145.683..55,255.260 rows=6,044,459 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
4. 20,413.077 20,413.077 ↑ 1.4 30,524,749 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.026..20,413.077 rows=30,524,749 loops=1)

5. 2,497.379 32,327.161 ↑ 1.1 6,044,570 1

Sort (cost=6,254,781.44..6,271,166.95 rows=6,554,204 width=16) (actual time=31,140.470..32,327.161 rows=6,044,570 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,327kB
6. 20,078.018 29,829.782 ↑ 1.2 5,281,355 1

Bitmap Heap Scan on document_n dn (cost=962,667.22..5,512,714.82 rows=6,554,204 width=16) (actual time=11,112.983..29,829.782 rows=5,281,355 loops=1)

  • Recheck Cond: (category = 2)
  • Filter: ((d_deleted = 0) AND ((rdate)::date >= '2018-07-02'::date))
  • Rows Removed by Filter: 22,778,604
  • Heap Blocks: exact=3,888,678
7. 9,751.764 9,751.764 ↓ 1.0 28,418,796 1

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..961,028.67 rows=28,146,680 width=0) (actual time=9,751.764..9,751.764 rows=28,418,796 loops=1)

  • Index Cond: (category = 2)
8. 174.160 1,158.577 ↑ 1.1 919,513 1

Hash (cost=225,880.49..225,880.49 rows=1,041,060 width=26) (actual time=1,158.577..1,158.577 rows=919,513 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 51,842kB
9. 204.178 984.417 ↑ 1.1 919,513 1

Hash Left Join (cost=112,679.29..225,880.49 rows=1,041,060 width=26) (actual time=403.980..984.417 rows=919,513 loops=1)

  • Hash Cond: (og_o.id = og_o_1.id)
10. 378.255 378.255 ↑ 1.1 919,513 1

Seq Scan on og_question_object og_o (cost=0.00..106,179.60 rows=1,041,060 width=10) (actual time=0.006..378.255 rows=919,513 loops=1)

11. 47.792 401.984 ↑ 1.1 276,235 1

Hash (cost=108,782.25..108,782.25 rows=311,763 width=16) (actual time=401.984..401.984 rows=276,235 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 17,045kB
12. 354.192 354.192 ↑ 1.1 276,235 1

Seq Scan on og_question_object og_o_1 (cost=0.00..108,782.25 rows=311,763 width=16) (actual time=0.006..354.192 rows=276,235 loops=1)

  • Filter: (cdate >= '2018-07-02 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 643,278
Planning time : 1.999 ms
Execution time : 60,254.880 ms