explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ojkv

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 83.174 ↑ 15.4 13 1

WindowAgg (cost=51,320.32..51,326.82 rows=200 width=516) (actual time=83.169..83.174 rows=13 loops=1)

2.          

CTE idrevs

3. 3.344 80.290 ↓ 5.7 11,409 1

HashAggregate (cost=51,240.48..51,260.44 rows=1,996 width=35) (actual time=79.401..80.290 rows=11,409 loops=1)

  • Group Key: "P/infrazione".id, "P/infrazione".rev, 0, "P/infrazione/apparato".matricola
4. 3.747 76.946 ↓ 5.7 11,409 1

Hash Join (cost=2.00..51,220.52 rows=1,996 width=35) (actual time=0.072..76.946 rows=11,409 loops=1)

  • Hash Cond: (("P/infrazione".apparato_id = "P/infrazione/apparato".id) AND ("P/infrazione".apparato_rev = "P/infrazione/apparato".rev))
5. 73.188 73.188 ↓ 1.0 62,192 1

Seq Scan on table_infrazione "P/infrazione" (cost=0.00..50,115.94 rows=61,864 width=12) (actual time=0.036..73.188 rows=62,192 loops=1)

  • Filter: (lastrev IS TRUE)
  • Rows Removed by Filter: 355,197
6. 0.006 0.011 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=35) (actual time=0.011..0.011 rows=40 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
7. 0.005 0.005 ↑ 1.0 40 1

Seq Scan on table_apparato "P/infrazione/apparato" (cost=0.00..1.40 rows=40 width=35) (actual time=0.001..0.005 rows=40 loops=1)

8. 1.398 83.158 ↑ 15.4 13 1

HashAggregate (cost=59.88..62.88 rows=200 width=516) (actual time=83.156..83.158 rows=13 loops=1)

  • Group Key: idrevs."/apparato/matricola
9. 81.760 81.760 ↓ 5.7 11,409 1

CTE Scan on idrevs (cost=0.00..39.92 rows=1,996 width=516) (actual time=79.403..81.760 rows=11,409 loops=1)

Planning time : 2.012 ms
Execution time : 83.318 ms