explain.depesz.com

PostgreSQL's explain analyze made readable

Result: o2KE

Settings
# exclusive inclusive rows x rows loops node
1. 268.216 985.806 ↓ 0.0 0 1

Delete on rm_dokument (cost=2,210.94..68,430.51 rows=10,000 width=34) (actual time=985.806..985.806 rows=0 loops=1)

2. 3.921 717.590 ↑ 1.0 9,899 1

Nested Loop (cost=2,210.94..68,430.51 rows=10,000 width=34) (actual time=118.448..717.590 rows=9,899 loops=1)

3. 8.738 123.669 ↑ 1.0 10,000 1

HashAggregate (cost=2,210.51..2,310.51 rows=10,000 width=32) (actual time=118.412..123.669 rows=10,000 loops=1)

4. 2.368 114.931 ↑ 1.0 10,000 1

Subquery Scan on ANY_subquery (cost=708.83..2,185.51 rows=10,000 width=32) (actual time=12.511..114.931 rows=10,000 loops=1)

5. 0.941 112.563 ↑ 1.0 10,000 1

Limit (cost=708.83..2,085.51 rows=10,000 width=4) (actual time=12.507..112.563 rows=10,000 loops=1)

6. 107.694 111.622 ↑ 111.6 10,000 1

Seq Scan on dokument (cost=708.83..154,316.97 rows=1,115,780 width=4) (actual time=12.507..111.622 rows=10,000 loops=1)

  • Filter: ((datum < '2019-01-01'::date) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 32054
7.          

SubPlan (forSeq Scan)

8. 3.928 3.928 ↑ 1.0 41,826 1

Seq Scan on presek_dokumenti_koji_ostaju (cost=0.00..604.26 rows=41,826 width=4) (actual time=0.010..3.928 rows=41,826 loops=1)

9. 590.000 590.000 ↑ 1.0 1 10,000

Index Scan using id_dokument on rm_dokument (cost=0.43..6.60 rows=1 width=10) (actual time=0.058..0.059 rows=1 loops=10,000)

  • Index Cond: (id_dokument = "ANY_subquery".id_dokument)