explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OHLk

Settings
# exclusive inclusive rows x rows loops node
1. 0.180 4,311.292 ↑ 1.0 1 1

Nested Loop Left Join (cost=2,071.86..234,573.80 rows=1 width=322) (actual time=4,311.287..4,311.292 rows=1 loops=1)

  • Join Filter: (l.rightholderid = s.id)
2. 0.005 4,311.024 ↑ 1.0 1 1

Nested Loop (cost=2,071.44..234,561.82 rows=1 width=1,021) (actual time=4,311.019..4,311.024 rows=1 loops=1)

3. 0.000 4,311.004 ↑ 1.0 1 1

Nested Loop (cost=2,071.16..234,561.52 rows=1 width=1,001) (actual time=4,311.000..4,311.004 rows=1 loops=1)

  • Join Filter: (l.objid = o.id)
4. 44.946 4,350.896 ↑ 1.0 1 1

Gather (cost=2,070.73..234,557.74 rows=1 width=671) (actual time=4,310.944..4,350.896 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 70.790 4,305.950 ↓ 0.0 0 3 / 3

Hash Join (cost=1,070.73..233,557.64 rows=1 width=671) (actual time=2,953.109..4,305.950 rows=0 loops=3)

  • Hash Cond: (r.objectidid = l.objid)
6. 4,234.991 4,234.991 ↓ 6.8 345,152 3 / 3

Parallel Seq Scan on reestr_1 r (cost=0.00..232,297.45 rows=50,519 width=639) (actual time=0.031..4,234.991 rows=345,152 loops=3)

  • Filter: ((now() >= COALESCE(((data ->> 'startdate'::text))::date, '-infinity'::date)) AND (now() <= COALESCE(((data ->> 'enddate'::text))::date, 'infinity'::date)))
  • Rows Removed by Filter: 18,584
7. 0.003 0.169 ↑ 1.0 1 3 / 3

Hash (cost=1,070.72..1,070.72 rows=1 width=32) (actual time=0.169..0.169 rows=1 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.003 0.166 ↑ 1.0 1 3 / 3

Nested Loop (cost=10.47..1,070.72 rows=1 width=32) (actual time=0.165..0.166 rows=1 loops=3)

  • Join Filter: (l.typeid = ot.id)
9. 0.022 0.068 ↑ 30.0 1 3 / 3

Bitmap Heap Scan on lawinstance l (cost=10.47..1,056.29 rows=30 width=36) (actual time=0.067..0.068 rows=1 loops=3)

  • Recheck Cond: (rightholderid = 'cc50e288-1d44-4cf1-8fed-525ff270caa0'::uuid)
  • Filter: ((now() >= COALESCE(startdate, '-infinity'::date)) AND (now() <= COALESCE(enddate, 'infinity'::date)))
  • Heap Blocks: exact=1
10. 0.046 0.046 ↑ 271.0 1 3 / 3

Bitmap Index Scan on lawinstance_rightholderid_idx (cost=0.00..10.46 rows=271 width=0) (actual time=0.046..0.046 rows=1 loops=3)

  • Index Cond: (rightholderid = 'cc50e288-1d44-4cf1-8fed-525ff270caa0'::uuid)
11. 0.006 0.095 ↑ 3.0 1 3 / 3

Materialize (cost=0.00..13.09 rows=3 width=4) (actual time=0.094..0.095 rows=1 loops=3)

12. 0.089 0.089 ↑ 3.0 1 3 / 3

Seq Scan on objecttype ot (cost=0.00..13.07 rows=3 width=4) (actual time=0.089..0.089 rows=1 loops=3)

  • Filter: ((appobjectid)::text = ANY ('{KVOD.v1.rightOper,KVOD.v1.rightEconomicManag,KVOD.v1.rightPermanentUse}'::text[]))
  • Rows Removed by Filter: 283
13. 0.044 0.044 ↑ 1.0 1 1

Index Scan using obj_pkey on obj o (cost=0.43..3.77 rows=1 width=378) (actual time=0.044..0.044 rows=1 loops=1)

  • Index Cond: (id = r.objectidid)
14. 0.015 0.015 ↑ 1.0 1 1

Index Scan using objecttype_pkey on objecttype oto (cost=0.28..0.29 rows=1 width=24) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (id = o.typeid)
15. 0.019 0.019 ↑ 1.0 1 1

Index Scan using subj_pkey on subj s (cost=0.42..8.44 rows=1 width=78) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (id = 'cc50e288-1d44-4cf1-8fed-525ff270caa0'::uuid)
16.          

SubPlan (for Nested Loop Left Join)

17. 0.002 0.069 ↓ 0.0 0 1

Limit (cost=3.50..3.51 rows=1 width=24) (actual time=0.069..0.069 rows=0 loops=1)

18. 0.013 0.067 ↓ 0.0 0 1

Sort (cost=3.50..3.75 rows=100 width=24) (actual time=0.067..0.067 rows=0 loops=1)

  • Sort Key: (((a.value ->> 'actualDate'::text))::date) DESC
  • Sort Method: quicksort Memory: 25kB
19. 0.054 0.054 ↓ 0.0 0 1

Function Scan on jsonb_array_elements a (cost=0.01..3.00 rows=100 width=24) (actual time=0.054..0.054 rows=0 loops=1)

  • Filter: ((value ->> 'cadastrCost'::text) IS NOT NULL)
  • Rows Removed by Filter: 1