explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K6kj

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

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

2. 4.598 1,265.070 ↓ 20.0 20 1

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

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

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

4. 1.923 1,254.701 ↓ 2,525.0 2,525 1

Subquery Scan on co_inner (cost=0.25..190.25 rows=1 width=1,406) (actual time=1,249.567..1,254.701 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. 15.882 1,252.778 ↓ 3.1 3,060 1

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

6. 1,236.896 1,236.896 ↓ 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=1,236.135..1,236.896 rows=3,060 loops=1)

Planning time : 0.515 ms
Execution time : 1,266.597 ms