explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ugMI

Settings
# exclusive inclusive rows x rows loops node
1. 0.191 43.577 ↓ 0.0 0 1

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

  • Hash Cond: (rrh.roadworkrequestid = roadworkrequest.id)
2. 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))
3. 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
4. 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)
5. 0.000 43.386 ↓ 0.0 0 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 512kB
6. 0.003 43.386 ↓ 0.0 0 1

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

  • Hash Cond: (roadworkrequest.roadworkrequestpsmorganisationid = o2.id)
7. 11.670 43.180 ↓ 0.0 0 1

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

  • Hash Cond: (roadworkrequest.roadworkrequestownerorganisationid = o1.id)
8. 22.452 31.415 ↑ 1.0 153,324 1

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

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

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

  • Index Cond: (psmexportid IS NULL)
10. 0.002 0.095 ↑ 33.3 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.005 0.093 ↑ 33.3 6 1

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

  • Group Key: o1.id
12. 0.088 0.088 ↑ 166.7 6 1

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

13. 0.002 0.203 ↑ 200.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.004 0.201 ↑ 200.0 1 1

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

  • Group Key: o2.id
15. 0.197 0.197 ↑ 1,000.0 1 1

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