explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Os4n

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 88.287 ↑ 1.0 3 1

Sort (cost=3,820.17..3,820.18 rows=3 width=119) (actual time=88.287..88.287 rows=3 loops=1)

  • Sort Key: sub.pristroj_do DESC, sub.serial_number
  • Sort Method: quicksort Memory: 25kB
  • Planning time: 0.678 ms
  • Execution time: 88.426 ms
2. 0.878 88.273 ↑ 1.0 3 1

Subquery Scan on sub (cost=2,576.60..3,820.15 rows=3 width=119) (actual time=88.139..88.273 rows=3 loops=1)

  • Filter: ((sub.odberne_miesto_id = 61) AND (sub.year_start = '2018-01-01'::date))
  • Rows Removed by Filter: 24868
3. 13.153 87.395 ↑ 1.0 24,871 1

WindowAgg (cost=2,576.60..3,447.08 rows=24,871 width=119) (actual time=73.154..87.395 rows=24,871 loops=1)

4. 61.126 74.242 ↑ 1.0 24,871 1

Sort (cost=2,576.60..2,638.77 rows=24,871 width=85) (actual time=73.136..74.242 rows=24,871 loops=1)

  • Sort Key: spotreba.serial_number
  • Sort Method: quicksort Memory: 4247kB
5. 8.344 13.116 ↑ 1.0 24,871 1

Hash Join (cost=109.66..760.74 rows=24,871 width=85) (actual time=2.184..13.116 rows=24,871 loops=1)

  • Hash Cond: (spotreba.pristroj_id = pristroj.id)
6. 2.618 2.618 ↑ 1.0 24,871 1

Seq Scan on mv_spotreba_celkovo spotreba (cost=0.00..585.71 rows=24,871 width=77) (actual time=0.013..2.618 rows=24,871 loops=1)

7. 1.064 2.154 ↑ 1.0 3,007 1

Hash (cost=72.07..72.07 rows=3,007 width=16) (actual time=2.154..2.154 rows=3,007 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 173kB
8. 1.090 1.090 ↑ 1.0 3,007 1

Seq Scan on pristroj (cost=0.00..72.07 rows=3,007 width=16) (actual time=0.010..1.090 rows=3,007 loops=1)