explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UJOa

Settings
# exclusive inclusive rows x rows loops node
1. 3,019.704 65,839.894 ↑ 1.0 1 1

Aggregate (cost=12,077,337.54..12,077,337.55 rows=1 width=48) (actual time=65,839.894..65,839.894 rows=1 loops=1)

2. 1,760.188 62,820.190 ↑ 6.7 4,390,998 1

Hash Join (cost=6,502,247.99..10,612,561.84 rows=29,295,514 width=34) (actual time=42,617.547..62,820.190 rows=4,390,998 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
3. 2,459.548 59,924.180 ↑ 4.8 6,044,227 1

Merge Join (cost=6,263,291.34..10,211,070.43 rows=29,295,514 width=16) (actual time=33,397.047..59,924.180 rows=6,044,227 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
4. 23,217.070 23,217.070 ↑ 1.4 30,524,440 1

Index Scan using fk_idx_bhpx on og_question og_q (cost=0.56..3,415,349.07 rows=42,995,336 width=16) (actual time=0.015..23,217.070 rows=30,524,440 loops=1)

5. 2,061.259 34,247.562 ↑ 1.1 6,044,338 1

Sort (cost=6,254,637.91..6,271,023.08 rows=6,554,068 width=16) (actual time=33,391.670..34,247.562 rows=6,044,338 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,318kB
6. 19,745.803 32,186.303 ↑ 1.2 5,281,174 1

Bitmap Heap Scan on document_n dn (cost=962,634.79..5,512,587.67 rows=6,554,068 width=16) (actual time=14,569.529..32,186.303 rows=5,281,174 loops=1)

  • Recheck Cond: (category = 2)
  • Filter: ((d_deleted = 0) AND ((rdate)::date >= '2018-07-02'::date))
  • Rows Removed by Filter: 22,778,323
  • Heap Blocks: exact=3,888,596
7. 12,440.500 12,440.500 ↓ 1.0 28,418,096 1

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..960,996.27 rows=28,146,094 width=0) (actual time=12,440.500..12,440.500 rows=28,418,096 loops=1)

  • Index Cond: (category = 2)
8. 162.293 1,135.822 ↑ 1.1 919,507 1

Hash (cost=225,926.11..225,926.11 rows=1,042,443 width=26) (actual time=1,135.822..1,135.822 rows=919,507 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 51,841kB
9. 191.594 973.529 ↑ 1.1 919,507 1

Hash Left Join (cost=112,701.75..225,926.11 rows=1,042,443 width=26) (actual time=410.632..973.529 rows=919,507 loops=1)

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

Seq Scan on og_question_object og_o (cost=0.00..106,193.43 rows=1,042,443 width=10) (actual time=0.009..372.294 rows=919,507 loops=1)

11. 40.506 409.641 ↑ 1.1 276,229 1

Hash (cost=108,799.54..108,799.54 rows=312,177 width=16) (actual time=409.641..409.641 rows=276,229 loops=1)

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

Seq Scan on og_question_object og_o_1 (cost=0.00..108,799.54 rows=312,177 width=16) (actual time=0.006..369.135 rows=276,229 loops=1)

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