explain.depesz.com

PostgreSQL's explain analyze made readable

Result: igwI

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 27.309 ↑ 1.0 1 1

Limit (cost=1,532.86..1,532.86 rows=1 width=39) (actual time=27.303..27.309 rows=1 loops=1)

  • Buffers: shared hit=357
2. 0.015 27.302 ↑ 1.5 11 1

Sort (cost=1,532.83..1,532.87 rows=16 width=39) (actual time=27.302..27.302 rows=11 loops=1)

  • Sort Key: (sum(COALESCE(pay.amount, '0'::numeric))) DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=357
3. 5.194 27.287 ↑ 1.0 16 1

HashAggregate (cost=1,532.31..1,532.51 rows=16 width=39) (actual time=27.283..27.287 rows=16 loops=1)

  • Group Key: cat.name
  • Buffers: shared hit=357
4. 4.226 22.093 ↓ 1.0 16,092 1

Hash Join (cost=752.37..1,452.07 rows=16,049 width=13) (actual time=6.195..22.093 rows=16,092 loops=1)

  • Buffers: shared hit=357
5. 3.845 16.913 ↓ 1.0 16,050 1

Hash Join (cost=639.06..1,118.08 rows=16,049 width=8) (actual time=5.233..16.913 rows=16,050 loops=1)

  • Buffers: shared hit=295
6. 4.557 11.982 ↑ 1.0 16,049 1

Hash Join (cost=510.99..947.83 rows=16,049 width=10) (actual time=4.119..11.982 rows=16,049 loops=1)

  • Buffers: shared hit=270
7. 0.977 3.382 ↑ 1.1 16,049 1

Append (cost=0..391.14 rows=17,409 width=10) (actual time=0.025..3.382 rows=16,049 loops=1)

  • Buffers: shared hit=120
8. 0.185 0.185 ↑ 1.0 1,157 1

Seq Scan on payment_p2007_01 pay (cost=0..20.57 rows=1,157 width=10) (actual time=0.024..0.185 rows=1,157 loops=1)

  • Buffers: shared hit=9
9. 0.338 0.338 ↑ 1.0 2,312 1

Seq Scan on payment_p2007_02 pay_1 (cost=0..40.12 rows=2,312 width=10) (actual time=0.014..0.338 rows=2,312 loops=1)

  • Buffers: shared hit=17
10. 0.869 0.869 ↑ 1.0 5,644 1

Seq Scan on payment_p2007_03 pay_2 (cost=0..98.44 rows=5,644 width=10) (actual time=0.013..0.869 rows=5,644 loops=1)

  • Buffers: shared hit=42
11. 0.965 0.965 ↑ 1.0 6,754 1

Seq Scan on payment_p2007_04 pay_3 (cost=0..117.54 rows=6,754 width=10) (actual time=0.029..0.965 rows=6,754 loops=1)

  • Buffers: shared hit=50
12. 0.041 0.041 ↑ 1.0 182 1

Seq Scan on payment_p2007_05 pay_4 (cost=0..3.82 rows=182 width=9) (actual time=0.019..0.041 rows=182 loops=1)

  • Buffers: shared hit=2
13. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on payment_p2007_06 pay_5 (cost=0..23.6 rows=1,360 width=16) (actual time=0.007..0.007 rows=0 loops=1)

14. 2.157 4.043 ↑ 1.0 16,044 1

Hash (cost=310.44..310.44 rows=16,044 width=8) (actual time=4.042..4.043 rows=16,044 loops=1)

  • Buffers: shared hit=150
15. 1.886 1.886 ↑ 1.0 16,044 1

Seq Scan on rental ren (cost=0..310.44 rows=16,044 width=8) (actual time=0.011..1.886 rows=16,044 loops=1)

  • Buffers: shared hit=150
16. 0.613 1.086 ↑ 1.0 4,581 1

Hash (cost=70.81..70.81 rows=4,581 width=6) (actual time=1.086..1.086 rows=4,581 loops=1)

  • Buffers: shared hit=25
17. 0.473 0.473 ↑ 1.0 4,581 1

Seq Scan on inventory inv (cost=0..70.81 rows=4,581 width=6) (actual time=0.011..0.473 rows=4,581 loops=1)

  • Buffers: shared hit=25
18. 0.147 0.954 ↑ 1.0 1,000 1

Hash (cost=100.81..100.81 rows=1,000 width=11) (actual time=0.954..0.954 rows=1,000 loops=1)

  • Buffers: shared hit=62
19. 0.198 0.807 ↑ 1.0 1,000 1

Hash Join (cost=78.86..100.81 rows=1,000 width=11) (actual time=0.348..0.807 rows=1,000 loops=1)

  • Buffers: shared hit=62
20. 0.212 0.312 ↑ 1.0 1,000 1

Hash Join (cost=1.36..20.67 rows=1,000 width=9) (actual time=0.043..0.312 rows=1,000 loops=1)

  • Buffers: shared hit=7
21. 0.076 0.076 ↑ 1.0 1,000 1

Seq Scan on film_category flm_cat (cost=0..16 rows=1,000 width=4) (actual time=0.009..0.076 rows=1,000 loops=1)

  • Buffers: shared hit=6
22. 0.008 0.024 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=11) (actual time=0.024..0.024 rows=16 loops=1)

  • Buffers: shared hit=1
23. 0.016 0.016 ↑ 1.0 16 1

Seq Scan on category cat (cost=0..1.16 rows=16 width=11) (actual time=0.014..0.016 rows=16 loops=1)

  • Buffers: shared hit=1
24. 0.133 0.297 ↑ 1.0 1,000 1

Hash (cost=65..65 rows=1,000 width=4) (actual time=0.297..0.297 rows=1,000 loops=1)

  • Buffers: shared hit=55
25. 0.164 0.164 ↑ 1.0 1,000 1

Seq Scan on film fil (cost=0..65 rows=1,000 width=4) (actual time=0.008..0.164 rows=1,000 loops=1)

  • Buffers: shared hit=55
Planning time : 1.253 ms
Execution time : 27.698 ms