explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wAyf

Settings
# exclusive inclusive rows x rows loops node
1. 0.049 64.348 ↑ 1.0 1 1

Aggregate (cost=828,704.33..828,704.34 rows=1 width=40) (actual time=64.348..64.348 rows=1 loops=1)

2. 0.000 64.299 ↓ 0.0 0 1

Nested Loop (cost=182,935.89..828,477.36 rows=22,697 width=100) (actual time=64.299..64.299 rows=0 loops=1)

3. 0.001 64.299 ↓ 0.0 0 1

Nested Loop (cost=182,927.44..635,950.06 rows=22,697 width=68) (actual time=64.299..64.299 rows=0 loops=1)

4. 0.000 64.298 ↓ 0.0 0 1

Nested Loop (cost=182,918.82..439,758.24 rows=22,697 width=36) (actual time=64.298..64.298 rows=0 loops=1)

5. 0.174 64.298 ↓ 0.0 0 1

Hash Join (cost=182,908.58..206,532.69 rows=22,697 width=4) (actual time=64.298..64.298 rows=0 loops=1)

  • Hash Cond: (rrh.roadworkrequestid = roadworkrequest.id)
6. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=138,951.84..154,098.17 rows=600,059 width=12) (never executed)

  • Group Key: rrh.roadworkrequestid
  • Filter: ((max(rrh."timestamp") >= (to_timestamp('20190105 12:00:00 AM'::text, 'yyyyMMdd HH24:MI:SS AM'::text))::timestamp without time zone) AND (max(rrh."timestamp") <= (to_timestamp('20190205 12:00:00 AM'::text, 'yyyyMMdd HH24:MI:SS AM'::text))::timestamp without time zone))
7. 0.000 0.000 ↓ 0.0 0

Sort (cost=138,951.84..141,238.27 rows=914,574 width=12) (never executed)

  • Sort Key: rrh.roadworkrequestid
8. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_roadworkrequesttypeid on roadworkrequesthistory rrh (cost=0.44..32,765.48 rows=914,574 width=12) (never executed)

  • Index Cond: (roadworkstatustypeid = 19)
9. 0.001 64.124 ↓ 0.0 0 1

Hash (cost=43,464.58..43,464.58 rows=39,373 width=4) (actual time=64.124..64.124 rows=0 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 512kB
10. 0.010 64.123 ↓ 0.0 0 1

Hash Join (cost=2,987.48..43,464.58 rows=39,373 width=4) (actual time=64.123..64.123 rows=0 loops=1)

  • Hash Cond: (roadworkrequest.roadworkrequestpsmorganisationid = o2.id)
11. 12.046 59.256 ↓ 0.0 0 1

Hash Join (cost=2,970.23..42,802.59 rows=78,746 width=8) (actual time=59.256..59.256 rows=0 loops=1)

  • Hash Cond: (roadworkrequest.roadworkrequestownerorganisationid = o1.id)
12. 36.323 46.900 ↑ 1.0 153,324 1

Bitmap Heap Scan on roadworkrequest (cost=2,952.98..41,495.89 rows=157,491 width=12) (actual time=11.326..46.900 rows=153,324 loops=1)

  • Recheck Cond: (psmexportid IS NULL)
  • Heap Blocks: exact=6366
13. 10.577 10.577 ↑ 1.0 153,324 1

Bitmap Index Scan on ix_roadworkrequest_psmexportid (cost=0.00..2,913.61 rows=157,491 width=0) (actual time=10.577..10.577 rows=153,324 loops=1)

  • Index Cond: (psmexportid IS NULL)
14. 0.003 0.310 ↑ 33.3 6 1

Hash (cost=14.75..14.75 rows=200 width=4) (actual time=0.310..0.310 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.006 0.307 ↑ 33.3 6 1

HashAggregate (cost=12.75..14.75 rows=200 width=4) (actual time=0.306..0.307 rows=6 loops=1)

  • Group Key: o1.id
16. 0.301 0.301 ↑ 166.7 6 1

Function Scan on getorgtree o1 (cost=0.25..10.25 rows=1,000 width=4) (actual time=0.300..0.301 rows=6 loops=1)

17. 0.015 4.857 ↑ 200.0 1 1

Hash (cost=14.75..14.75 rows=200 width=4) (actual time=4.857..4.857 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.007 4.842 ↑ 200.0 1 1

HashAggregate (cost=12.75..14.75 rows=200 width=4) (actual time=4.841..4.842 rows=1 loops=1)

  • Group Key: o2.id
19. 4.835 4.835 ↑ 1,000.0 1 1

Function Scan on getorgtree o2 (cost=0.25..10.25 rows=1,000 width=4) (actual time=4.835..4.835 rows=1 loops=1)

20. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=10.25..10.26 rows=1 width=32) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_roadworkrequestmaterial_roadworkrequestid_ispsm on roadworkrequestmaterial m (cost=0.43..10.24 rows=2 width=6) (never executed)

  • Index Cond: ((roadworkrequest.id = roadworkrequestid) AND (ispsm = true))
  • Filter: ispsm
22. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.61..8.62 rows=1 width=32) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_roadworkrequestpenalty_roadworkrequestid on roadworkrequestpenalty p (cost=0.42..8.61 rows=1 width=5) (never executed)

  • Index Cond: (roadworkrequest.id = roadworkrequestid)
  • Filter: ispsm
24. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=32) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_roadworkrequestadditional_roadworkrequestid_ispsm on roadworkrequestadditional a (cost=0.43..8.45 rows=1 width=3) (never executed)

  • Index Cond: ((roadworkrequest.id = roadworkrequestid) AND (ispsm = true))
  • Filter: ispsm