explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 393H

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 26,167.640 ↑ 6.5 2 1

Nested Loop (cost=92,665.42..145,058.57 rows=13 width=44) (actual time=2,007.730..26,167.640 rows=2 loops=1)

2. 1,050.314 26,167.579 ↑ 6.0 2 1

Hash Right Join (cost=92,664.99..145,051.99 rows=12 width=4) (actual time=2,007.698..26,167.579 rows=2 loops=1)

  • Hash Cond: (cp.roadworkrequestid = roadworkrequest.id)
  • Filter: ((cp.permitid = 11,465) OR ((roadworkrequest.permitid = 11,465) AND (roadworkrequest.roadworkstatustypeid <> ALL ('{15,3,14}'::integer[])) AND (SubPlan 1)))
  • Rows Removed by Filter: 1,464,323
3. 192.749 192.749 ↑ 1.0 1,462,553 1

Seq Scan on combipartners cp (cost=0.00..27,708.53 rows=1,462,553 width=8) (actual time=0.036..192.749 rows=1,462,553 loops=1)

4. 249.794 736.867 ↓ 1.0 1,376,619 1

Hash (cost=66,049.44..66,049.44 rows=1,376,444 width=28) (actual time=736.867..736.867 rows=1,376,619 loops=1)

  • Buckets: 65,536 Batches: 32 Memory Usage: 2,785kB
5. 487.073 487.073 ↓ 1.0 1,376,619 1

Seq Scan on roadworkrequest (cost=0.00..66,049.44 rows=1,376,444 width=28) (actual time=0.042..487.073 rows=1,376,619 loops=1)

6.          

SubPlan (for Hash Right Join)

7. 24,187.649 24,187.649 ↑ 20.0 1 139,813

Function Scan on getorgtree t (cost=0.25..20.25 rows=20 width=0) (actual time=0.173..0.173 rows=1 loops=139,813)

  • Filter: ((roadworkrequest.roadworkrequestpsmorganisationid = id) OR (roadworkrequest.roadworkrequestpsmcontractororganisationid = id) OR (roadworkrequest.roadworkrequestownerorganisationid = id) OR (roadworkrequest.roadworkrequestownercontractororganisationid = id))
  • Rows Removed by Filter: 2,382
8. 0.030 0.030 ↑ 2.0 1 2

Index Scan using ix_geometryroadworkid on geometryroadwork (cost=0.43..0.53 rows=2 width=64) (actual time=0.015..0.015 rows=1 loops=2)

  • Index Cond: (entityid = roadworkrequest.id)
Planning time : 0.492 ms