explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 77B

Settings
# exclusive inclusive rows x rows loops node
1. 1,471.914 57,201.954 ↑ 6.7 4,391,153 1

Hash Join (cost=6,502,332.96..10,612,661.05 rows=29,296,037 width=16) (actual time=38,089.100..57,201.954 rows=4,391,153 loops=1)

  • Hash Cond: (og_q.og_question_object_id = og_o.id)
2. 2,428.334 54,766.376 ↑ 4.8 6,044,426 1

Merge Join (cost=6,263,414.43..10,211,204.85 rows=29,296,037 width=8) (actual time=29,618.471..54,766.376 rows=6,044,426 loops=1)

  • Merge Cond: (og_q.document_id = dn.document_id)
3. 21,802.411 21,802.411 ↑ 1.4 30,524,685 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..21,802.411 rows=30,524,685 loops=1)

4. 2,198.913 30,535.631 ↑ 1.1 6,044,537 1

Sort (cost=6,254,760.84..6,271,146.30 rows=6,554,185 width=8) (actual time=29,612.705..30,535.631 rows=6,044,537 loops=1)

  • Sort Key: dn.document_id
  • Sort Method: quicksort Memory: 422,325kB
5. 19,063.825 28,336.718 ↑ 1.2 5,281,327 1

Bitmap Heap Scan on document_n dn (cost=962,662.59..5,512,696.51 rows=6,554,185 width=8) (actual time=10,654.422..28,336.718 rows=5,281,327 loops=1)

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

Bitmap Index Scan on dn_ctg_orgid_n_docid_idx (cost=0.00..961,024.04 rows=28,146,596 width=0) (actual time=9,272.893..9,272.893 rows=28,418,699 loops=1)

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

Hash (cost=225,898.47..225,898.47 rows=1,041,605 width=16) (actual time=963.664..963.664 rows=919,513 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 46,269kB
8. 175.362 825.674 ↑ 1.1 919,513 1

Hash Left Join (cost=112,688.14..225,898.47 rows=1,041,605 width=16) (actual time=409.202..825.674 rows=919,513 loops=1)

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

Seq Scan on og_question_object og_o (cost=0.00..106,185.05 rows=1,041,605 width=8) (actual time=0.007..243.331 rows=919,513 loops=1)

10. 42.712 406.981 ↑ 1.1 276,235 1

Hash (cost=108,789.06..108,789.06 rows=311,926 width=8) (actual time=406.981..406.981 rows=276,235 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 14,887kB
11. 364.269 364.269 ↑ 1.1 276,235 1

Seq Scan on og_question_object og_o_1 (cost=0.00..108,789.06 rows=311,926 width=8) (actual time=0.008..364.269 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 : 2.078 ms
Execution time : 57,355.647 ms