explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9uXm

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 1,230.356 ↓ 20.0 20 1

Limit (cost=24.02..24.03 rows=1 width=1,246) (actual time=1,230.343..1,230.356 rows=20 loops=1)

2. 2.974 1,230.345 ↓ 20.0 20 1

Sort (cost=24.02..24.03 rows=1 width=1,246) (actual time=1,230.341..1,230.345 rows=20 loops=1)

  • Sort Key: ((NOT co.cancelled)) DESC, co.statuschanged DESC
  • Sort Method: top-N heapsort Memory: 35kB
3. 3.188 1,227.371 ↓ 2,525.0 2,525 1

WindowAgg (cost=0.25..24.01 rows=1 width=1,246) (actual time=1,225.336..1,227.371 rows=2,525 loops=1)

4. 1,224.183 1,224.183 ↓ 2,525.0 2,525 1

Function Scan on contract_list_view co (cost=0.25..24.00 rows=1 width=1,246) (actual time=1,222.280..1,224.183 rows=2,525 loops=1)

  • Filter: ((NOT cancelled) AND (tenantid = '57354260-41df-11e5-a151-feff819cdc9f'::uuid) AND (((NOT createdasexecuted) AND (NOT terminated) AND (documentstatus <> ALL ('{EXECUTED,NEXECUTED,CANCELLED,NCANCELLED,EXPIRED,SIGNED,NSIGNED}'::text[]))) OR (COALESCE(documentstatus, ''::text) = ''::text)))
  • Rows Removed by Filter: 535
Planning time : 0.256 ms
Execution time : 1,231.572 ms