explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cNF

Settings
# exclusive inclusive rows x rows loops node
1. 2,483.596 22,994.727 ↑ 1.0 1 1

Aggregate (cost=5,740,081.59..5,740,081.60 rows=1 width=48) (actual time=22,994.727..22,994.727 rows=1 loops=1)

2. 605.202 20,511.131 ↑ 2.5 2,840,562 1

Merge Join (cost=137,385.91..5,403,090.61 rows=7,094,547 width=26) (actual time=510.824..20,511.131 rows=2,840,562 loops=1)

  • Merge Cond: (og_q.og_question_object_id = og_o.id)
3. 258.602 19,083.115 ↑ 2.5 2,840,563 1

Nested Loop (cost=1.01..45,758,425.72 rows=7,094,547 width=16) (actual time=0.021..19,083.115 rows=2,840,563 loops=1)

4. 3,340.503 3,340.503 ↑ 8.2 3,096,802 1

Index Scan using og_question_og_question_object_id_idx on og_question og_q (cost=0.44..3,941,164.08 rows=25,459,408 width=16) (actual time=0.007..3,340.503 rows=3,096,802 loops=1)

5. 15,484.010 15,484.010 ↑ 2.0 1 3,096,802

Index Scan using doc_n_did_c_n_nbl_del_oid_idx on document_n dn (cost=0.57..1.62 rows=2 width=16) (actual time=0.004..0.005 rows=1 loops=3,096,802)

  • Index Cond: ((document_id = og_q.document_id) AND (category = 2) AND (d_deleted = 0))
  • Filter: ((cdate)::date >= '2018-07-01'::date)
  • Rows Removed by Filter: 0
6. 503.173 822.814 ↓ 4.3 3,435,514 1

Sort (cost=136,952.60..138,930.73 rows=791,252 width=18) (actual time=510.798..822.814 rows=3,435,514 loops=1)

  • Sort Key: og_o.id
  • Sort Method: quicksort Memory: 89609kB
7. 319.641 319.641 ↓ 1.1 832,413 1

Seq Scan on og_question_object og_o (cost=0.00..59,434.52 rows=791,252 width=18) (actual time=0.005..319.641 rows=832,413 loops=1)