explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Oxep

Settings
# exclusive inclusive rows x rows loops node
1. 0.158 4,828.179 ↑ 1.0 1 1

Nested Loop Left Join (cost=2,071.86..234,446.85 rows=1 width=322) (actual time=4,828.175..4,828.179 rows=1 loops=1)

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

Nested Loop (cost=2,071.44..234,434.87 rows=1 width=1,021) (actual time=4,827.955..4,827.958 rows=1 loops=1)

3. 0.000 4,827.947 ↑ 1.0 1 1

Nested Loop (cost=2,071.16..234,434.58 rows=1 width=1,001) (actual time=4,827.944..4,827.947 rows=1 loops=1)

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

Gather (cost=2,070.73..234,430.78 rows=1 width=671) (actual time=4,827.900..4,873.071 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 1
5. 99.546 4,822.911 ↓ 0.0 0 2 / 2

Hash Join (cost=1,070.73..233,430.68 rows=1 width=671) (actual time=2,988.463..4,822.911 rows=0 loops=2)

  • Hash Cond: (r.objectidid = l.objid)
6. 4,723.217 4,723.217 ↓ 10.3 517,728 2 / 2

Parallel Seq Scan on reestr_1 r (cost=0.00..232,171.99 rows=50,120 width=639) (actual time=7.539..4,723.217 rows=517,728 loops=2)

  • Filter: ((now() >= COALESCE(((data ->> 'startdate'::text))::date, '-infinity'::date)) AND (now() <= COALESCE(((data ->> 'enddate'::text))::date, 'infinity'::date)))
  • Rows Removed by Filter: 27,876
7. 0.003 0.148 ↑ 1.0 1 2 / 2

Hash (cost=1,070.72..1,070.72 rows=1 width=32) (actual time=0.148..0.148 rows=1 loops=2)

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

Nested Loop (cost=10.47..1,070.72 rows=1 width=32) (actual time=0.144..0.145 rows=1 loops=2)

  • Join Filter: (l.typeid = ot.id)
9. 0.014 0.057 ↑ 30.0 1 2 / 2

Bitmap Heap Scan on lawinstance l (cost=10.47..1,056.29 rows=30 width=36) (actual time=0.056..0.057 rows=1 loops=2)

  • 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.043 0.043 ↑ 271.0 1 2 / 2

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

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

Materialize (cost=0.00..13.09 rows=3 width=4) (actual time=0.084..0.085 rows=1 loops=2)

12. 0.081 0.081 ↑ 3.0 1 2 / 2

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

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

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

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

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

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

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

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

SubPlan (for Nested Loop Left Join)

17. 0.002 0.052 ↓ 0.0 0 1

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

18. 0.018 0.050 ↓ 0.0 0 1

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

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

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

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