explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VY8d

Settings
# exclusive inclusive rows x rows loops node
1. 154.715 2,538.409 ↓ 0.0 0 1

HashAggregate (cost=701,596.90..702,916.30 rows=131,940 width=53) (actual time=2,538.409..2,538.409 rows=0 loops=1)

  • Group Key: ds.document_id, ds.company_id
  • Filter: (every((s.id IS NOT NULL)) AND (max(s.date_created) > '2019-10-20 00:00:00+00'::timestamp with time zone))
  • Rows Removed by Filter: 171,628
2. 73.024 2,383.694 ↓ 1.0 285,001 1

Nested Loop Left Join (cost=0.56..698,751.79 rows=284,511 width=98) (actual time=0.019..2,383.694 rows=285,001 loops=1)

3. 30.662 30.662 ↓ 1.0 285,001 1

Seq Scan on document_signers ds (cost=0.00..8,780.11 rows=284,511 width=69) (actual time=0.007..30.662 rows=285,001 loops=1)

4. 2,280.008 2,280.008 ↑ 1.0 1 285,001

Index Scan using ix_signatures_document_id on signatures s (cost=0.56..2.42 rows=1 width=98) (actual time=0.008..0.008 rows=1 loops=285,001)

  • Index Cond: ((document_id)::text = (ds.document_id)::text)
  • Filter: (role_id = ds.role_id)
  • Rows Removed by Filter: 1
Planning time : 0.556 ms
Execution time : 2,539.834 ms