explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KZu : test

Settings
# exclusive inclusive rows x rows loops node
1. 46.135 235,923.646 ↓ 15.3 302,230 1

Subquery Scan on vwstockperwh (cost=3,911,878.04..3,919,729.92 rows=19,754 width=94) (actual time=235,305.106..235,923.646 rows=302,230 loops=1)

  • Buffers: shared hit=14 read=191285, temp read=275699 written=275699
2. 280.011 235,877.511 ↓ 15.3 302,230 1

GroupAggregate (cost=3,911,878.04..3,919,532.38 rows=19,754 width=212) (actual time=235,305.101..235,877.511 rows=302,230 loops=1)

  • Buffers: shared hit=14 read=191285, temp read=275699 written=275699
3. 120.012 235,597.500 ↓ 1.6 319,640 1

Unique (cost=3,911,878.04..3,914,841.01 rows=197,531 width=78) (actual time=235,305.077..235,597.500 rows=319,640 loops=1)

  • Buffers: shared hit=14 read=191285, temp read=275699 written=275699
4. 2,895.437 235,477.488 ↓ 1.6 319,640 1

Sort (cost=3,911,878.04..3,912,371.87 rows=197,531 width=78) (actual time=235,305.075..235,477.488 rows=319,640 loops=1)

  • Sort Key: ""*SELECT* 1"".produkid, ""*SELECT* 1"".warehousename, ""*SELECT* 1"".awal, ((0)::numeric), ((0)::numeric)
  • Sort Method: external merge Disk: 13592kB
  • Buffers: shared hit=14 read=191285, temp read=275699 written=275699
5. 31.325 232,582.051 ↓ 1.6 319,640 1

Append (cost=3,522.55..3,876,947.49 rows=197,531 width=78) (actual time=370.302..232,582.051 rows=319,640 loops=1)

  • Buffers: shared hit=4 read=191285, temp read=273999 written=273999
6. 6.779 411.442 ↑ 1.0 23,438 1

Subquery Scan on "*SELECT* 1" (cost=3,522.55..4,225.84 rows=23,443 width=76) (actual time=370.298..411.442 rows=23,438 loops=1)

  • Buffers: shared hit=3 read=221, temp read=101 written=101
7. 27.720 404.663 ↑ 1.0 23,438 1

GroupAggregate (cost=3,522.55..3,991.41 rows=23,443 width=76) (actual time=370.289..404.663 rows=23,438 loops=1)

  • Buffers: shared hit=3 read=221, temp read=101 written=101
8. 188.493 376.943 ↑ 1.0 23,443 1

Sort (cost=3,522.55..3,581.15 rows=23,443 width=76) (actual time=370.280..376.943 rows=23,443 loops=1)

  • Sort Key: tblstockawal.kodebarang, tblwarehouse.warehousename
  • Sort Method: external merge Disk: 800kB
  • Buffers: shared hit=3 read=221, temp read=101 written=101
9. 9.243 188.450 ↑ 1.0 23,443 1

Hash Join (cost=1.18..777.95 rows=23,443 width=76) (actual time=34.831..188.450 rows=23,443 loops=1)

  • Hash Cond: (tblstockawal.warehouseid = tblwarehouse.id)
  • Buffers: shared hit=3 read=221
10. 153.124 153.124 ↑ 1.0 23,443 1

Seq Scan on tblstockawal (cost=0.00..454.43 rows=23,443 width=22) (actual time=8.689..153.124 rows=23,443 loops=1)

  • Buffers: shared read=220
11. 0.008 26.083 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=62) (actual time=26.083..26.083 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared read=1
12. 26.075 26.075 ↑ 1.0 8 1

Seq Scan on tblwarehouse (cost=0.00..1.08 rows=8 width=62) (actual time=26.071..26.075 rows=8 loops=1)

  • Buffers: shared read=1
13. 86.617 232,139.284 ↓ 1.7 296,202 1

Subquery Scan on "*SELECT* 2" (cost=3,731,043.85..3,872,721.66 rows=174,088 width=78) (actual time=201,913.730..232,139.284 rows=296,202 loops=1)

  • Buffers: shared hit=1 read=191064, temp read=273898 written=273898
14. 6,215.221 232,052.667 ↓ 1.7 296,202 1

GroupAggregate (cost=3,731,043.85..3,870,980.78 rows=174,088 width=78) (actual time=201,913.721..232,052.667 rows=296,202 loops=1)

  • Buffers: shared hit=1 read=191064, temp read=273898 written=273898
15. 201,494.734 225,837.446 ↓ 1.1 12,437,357 1

Sort (cost=3,731,043.85..3,758,683.06 rows=11,055,684 width=78) (actual time=201,912.231..225,837.446 rows=12,437,357 loops=1)

  • Sort Key: tbltransaksi.kodebarang, tblwarehouse_1.warehousename
  • Sort Method: external merge Disk: 464424kB
  • Buffers: shared hit=1 read=191064, temp read=273898 written=273898
16. 5,016.274 24,342.712 ↓ 1.1 12,437,357 1

Hash Join (cost=1.18..472,639.62 rows=11,055,684 width=78) (actual time=5.371..24,342.712 rows=12,437,357 loops=1)

  • Hash Cond: (tbltransaksi.warehouseid = tblwarehouse_1.id)
  • Buffers: shared hit=1 read=191064
17. 19,326.430 19,326.430 ↑ 1.0 12,437,644 1

Seq Scan on tbltransaksi (cost=0.00..315,440.44 rows=12,437,644 width=24) (actual time=5.346..19,326.430 rows=12,437,644 loops=1)

  • Buffers: shared read=191064
18. 0.004 0.008 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=62) (actual time=0.008..0.008 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • Buffers: shared hit=1
19. 0.004 0.004 ↑ 1.0 8 1

Seq Scan on tblwarehouse tblwarehouse_1 (cost=0.00..1.08 rows=8 width=62) (actual time=0.003..0.004 rows=8 loops=1)

  • Buffers: shared hit=1