explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NHEB

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.080 ↑ 1.0 4 1

"hash left join (cost=41.49..42.53 rows=4 width=54) (actual time=0.078..0.080 rows=4 loops=1)

  • output: t1._q_001_f_000rref, t1._q_001_f_001, t2.fld49balance_
  • inner unique: true
  • hash cond: ((t1._q_001_f_000rref = t2.fld48rref) and (t1._q_001_f_002rref = t2.fld47rref))
  • buffers: shared hit=16, local hit=2
2. 0.010 0.010 ↑ 1.0 4 1

seq scan on pg_temp_6.tt3 t1 (cost=0.00..1.04 rows=4 width=39) (actual time=0.010..0.010 rows=4 loops=1)

  • output: t1._q_001_f_000rref, t1._q_001_f_001, t1._q_001_f_002rref
  • buffers: local hit=1
3. 0.004 0.062 ↑ 2.2 4 1

hash (cost=41.38..41.38 rows=9 width=66) (actual time=0.062..0.062 rows=4 loops=1)

  • output: t2.fld49balance_, t2.fld48rref, t2.fld47rref
  • buckets: 1024 batches: 1 memory usage: 9kb
  • buffers: shared hit=16, local hit=1
4. 0.000 0.058 ↑ 2.2 4 1

subquery scan on t2 (cost=41.13..41.38 rows=9 width=66) (actual time=0.055..0.058 rows=4 loops=1)

  • output: t2.fld49balance_, t2.fld48rref, t2.fld47rref
  • buffers: shared hit=16, local hit=1
5. 0.007 0.058 ↑ 2.2 4 1

groupaggregate (cost=41.13..41.29 rows=9 width=66) (actual time=0.055..0.058 rows=4 loops=1)

  • output: t3.Товар, t3.Склад, sum(t3.Количество)
  • group key: t3.Товар, t3.Склад
  • filter: (sum(t3.Количество) <> '0'::numeric)
  • buffers: shared hit=16, local hit=1
6. 0.009 0.051 ↑ 1.1 8 1

sort (cost=41.13..41.14 rows=9 width=39) (actual time=0.050..0.051 rows=8 loops=1)

  • output: t3.Товар, t3.Склад, t3.Количество
  • sort key: t3.Товар
  • sort method: quicksort memory: 25kb
  • buffers: shared hit=16, local hit=1
7. 0.003 0.042 ↑ 1.1 8 1

nested loop (cost=1.23..40.98 rows=9 width=39) (actual time=0.026..0.042 rows=8 loops=1)

  • output: t3.Товар, t3.Склад, t3.Количество
  • buffers: shared hit=16, local hit=1
8. 0.002 0.015 ↑ 1.0 4 1

unique (cost=1.06..1.06 rows=4 width=17) (actual time=0.013..0.015 rows=4 loops=1)

  • output: t4._q_001_f_000rref
  • buffers: local hit=1
9. 0.007 0.013 ↑ 1.0 4 1

sort (cost=1.06..1.06 rows=4 width=17) (actual time=0.013..0.013 rows=4 loops=1)

  • output: t4._q_001_f_000rref
  • sort key: t4._q_001_f_000rref
  • sort method: quicksort memory: 25kb
  • buffers: local hit=1
10. 0.006 0.006 ↑ 1.0 4 1

seq scan on pg_temp_6.tt3 t4 (cost=0.00..1.04 rows=4 width=17) (actual time=0.006..0.006 rows=4 loops=1)

  • output: t4._q_001_f_000rref
  • buffers: local hit=1
11. 0.024 0.024 ↑ 1.0 2 4

index scan using _1 on public. t3 (cost=0.17..9.96 rows=2 width=39) (actual time=0.005..0.006 rows=2 loops=4)

  • output: t3.Период, t3.Склад, t3.Товар, t3.Количество, t3._splitter
  • index cond: ((t3.Период = '3999-11-01 00:00:00'::timestamp without time zone) and (t3.Склад = '\\x93538ca982e0f8c011e9b9b404815ebb'::bytea) and (t3.Товар = t4._q_001_f_000rref))
  • filter: ((t3.Количество <> '0'::numeric) and (t3.Количество <> '0'::numeric))
  • buffers: shared hit=16
Planning time : 0.532 ms
Execution time : 0.135 ms