explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GQLh

Settings
# exclusive inclusive rows x rows loops node
1. 0.181 170.853 ↓ 0.0 0 1

Hash Join (cost=188,794.98..212,419.09 rows=22,697 width=4) (actual time=170.853..170.853 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 170.672 ↓ 0.0 0 1

Hash (cost=49,350.79..49,350.79 rows=39,388 width=4) (actual time=170.672..170.672 rows=0 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 512kB
6. 0.005 170.672 ↓ 0.0 0 1

Hash Join (cost=34.50..49,350.79 rows=39,388 width=4) (actual time=170.672..170.672 rows=0 loops=1)

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

Hash Join (cost=17.25..48,688.55 rows=78,777 width=8) (actual time=170.507..170.507 rows=0 loops=1)

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

Seq Scan on roadworkrequest (cost=0.00..47,381.33 rows=157,554 width=12) (actual time=0.008..162.570 rows=153,324 loops=1)

  • Filter: (psmexportid IS NULL)
  • Rows Removed by Filter: 887593
9. 0.002 0.096 ↑ 33.3 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.003 0.094 ↑ 33.3 6 1

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

  • Group Key: o1.id
11. 0.091 0.091 ↑ 166.7 6 1

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

12. 0.001 0.160 ↑ 200.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.003 0.159 ↑ 200.0 1 1

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

  • Group Key: o2.id
14. 0.156 0.156 ↑ 1,000.0 1 1

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