explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZlFP

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 978.036 ↓ 20.0 20 1

Limit (cost=190.27..190.28 rows=1 width=1,406) (actual time=978.025..978.036 rows=20 loops=1)

2. 4.880 978.024 ↓ 20.0 20 1

Sort (cost=190.27..190.28 rows=1 width=1,406) (actual time=978.023..978.024 rows=20 loops=1)

  • Sort Key: ((NOT co_inner.cancelled)) DESC, co_inner.statuschanged DESC
  • Sort Method: top-N heapsort Memory: 36kB
3. 5.896 973.144 ↓ 2,525.0 2,525 1

WindowAgg (cost=0.25..190.26 rows=1 width=1,406) (actual time=970.063..973.144 rows=2,525 loops=1)

4. 1.926 967.248 ↓ 2,525.0 2,525 1

Subquery Scan on co_inner (cost=0.25..190.25 rows=1 width=1,406) (actual time=962.101..967.248 rows=2,525 loops=1)

  • Filter: ((NOT co_inner.cancelled) AND (co_inner.tenantid = '57354260-41df-11e5-a151-feff819cdc9f'::uuid) AND (((NOT co_inner.createdasexecuted) AND (NOT co_inner.terminated) AND (co_inner.documentstatus <> ALL ('{EXECUTED,NEXECUTED,CANCELLED,NCANCELLED,EXPIRED,SIGNED,NSIGNED}'::text[]))) OR (COALESCE(co_inner.documentstatus, ''::text) = ''::text)))
  • Rows Removed by Filter: 535
5. 16.080 965.322 ↓ 3.1 3,060 1

WindowAgg (cost=0.25..166.50 rows=1,000 width=1,246) (actual time=962.092..965.322 rows=3,060 loops=1)

6. 949.242 949.242 ↓ 3.1 3,060 1

Function Scan on contract_list_view co (cost=0.25..10.25 rows=1,000 width=1,246) (actual time=948.491..949.242 rows=3,060 loops=1)

Planning time : 0.559 ms
Execution time : 979.673 ms