explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yjas

Settings
# exclusive inclusive rows x rows loops node
1. 1,089.488 63,149.944 ↑ 1.0 1 1

Aggregate (cost=10,931,993.16..10,931,993.17 rows=1 width=16) (actual time=63,149.944..63,149.944 rows=1 loops=1)

2. 1,444.672 62,060.456 ↑ 6.7 4,390,726 1

Hash Join (cost=6,382,291.63..10,492,576.53 rows=29,294,442 width=16) (actual time=42,213.651..62,060.456 rows=4,390,726 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
3. 2,531.233 60,206.023 ↑ 4.8 6,043,874 1

Merge Join (cost=6,263,035.74..10,210,791.82 rows=29,294,442 width=16) (actual time=34,057.314..60,206.023 rows=6,043,874 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
4. 22,407.305 22,407.305 ↑ 1.4 30,523,603 1

Index Scan using fk_idx_bhpx on og_question og_q (cost=0.56..3,415,341.07 rows=42,995,336 width=16) (actual time=0.019..22,407.305 rows=30,523,603 loops=1)

5. 2,561.912 35,267.485 ↑ 1.1 6,043,985 1

Sort (cost=6,254,382.63..6,270,767.20 rows=6,553,828 width=16) (actual time=34,051.845..35,267.485 rows=6,043,985 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,305kB
6. 20,520.803 32,705.573 ↑ 1.2 5,280,891 1

Bitmap Heap Scan on document_n dn (cost=962,575.01..5,512,361.29 rows=6,553,828 width=16) (actual time=13,804.359..32,705.573 rows=5,280,891 loops=1)

  • Recheck Cond: (category = 2)
  • Filter: ((d_deleted = 0) AND ((rdate)::date >= '2018-07-02'::date))
  • Rows Removed by Filter: 22,778,044
  • Heap Blocks: exact=3,888,451
7. 12,184.770 12,184.770 ↓ 1.0 28,417,163 1

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..960,936.55 rows=28,145,064 width=0) (actual time=12,184.770..12,184.770 rows=28,417,163 loops=1)

  • Index Cond: (category = 2)
8. 148.986 409.761 ↑ 1.1 919,501 1

Hash (cost=106,207.62..106,207.62 rows=1,043,862 width=8) (actual time=409.761..409.761 rows=919,501 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 44,111kB
9. 260.775 260.775 ↑ 1.1 919,501 1

Seq Scan on og_question_object og_o (cost=0.00..106,207.62 rows=1,043,862 width=8) (actual time=0.008..260.775 rows=919,501 loops=1)

Planning time : 1.946 ms
Execution time : 63,165.105 ms