explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ag5D

Settings
# exclusive inclusive rows x rows loops node
1. 3.770 68.280 ↑ 1.0 10,586 1

"hash right join (cost=14,810.30..15,528.89 rows=10,586 width=54) (actual time=55.986..68.280 rows=10,586 loops=1)

  • output: t1._q_001_f_000rref, t1._q_001_f_001, (sum(t3.Количество))
  • hash cond: ((t3.Товар = t1._q_001_f_000rref) and (t3.Склад = t1._q_001_f_002rref))
  • buffers: shared hit=2193, local hit=178
2. 7.887 62.155 ↑ 2.3 10,586 1

groupaggregate (cost=14,488.41..14,894.93 rows=23,913 width=66) (actual time=53.576..62.155 rows=10,586 loops=1)

  • output: t3.Товар, t3.Склад, sum(t3.Количество)
  • group key: t3.Товар, t3.Склад
  • filter: (sum(t3.Количество) <> '0'::numeric)
  • buffers: shared hit=2193, local hit=89
3. 4.949 54.268 ↑ 1.1 20,867 1

sort (cost=14,488.41..14,512.32 rows=23,913 width=39) (actual time=53.546..54.268 rows=20,867 loops=1)

  • output: t3.Товар, t3.Склад, t3.Количество
  • sort key: t3.Товар
  • sort method: quicksort memory: 2399kb
  • buffers: shared hit=2193, local hit=89
4. 14.100 49.319 ↑ 1.1 20,867 1

hash semi join (cost=3,589.42..13,506.35 rows=23,913 width=39) (actual time=9.693..49.319 rows=20,867 loops=1)

  • output: t3.Товар, t3.Склад, t3.Количество
  • hash cond: (t3.Товар = t4._q_001_f_000rref)
  • buffers: shared hit=2193, local hit=89
5. 25.712 33.031 ↓ 1.5 118,243 1

bitmap heap scan on public. t3 (cost=3,278.11..12,859.73 rows=81,356 width=39) (actual time=7.452..33.031 rows=118,243 loops=1)

  • output: t3.Период, t3.Склад, t3.Товар, t3.Количество, t3._splitter
  • recheck cond: ((t3.Период = '3999-11-01 00:00:00'::timestamp without time zone) and (t3.Склад = '\\x93538ca982e0f8c011e9b9b404815ebb'::bytea))
  • filter: ((t3.Количество <> '0'::numeric) and (t3.Количество <> '0'::numeric))
  • heap blocks: exact=1220
  • buffers: shared hit=2193
6. 7.319 7.319 ↓ 1.5 118,243 1

bitmap index scan on _1 (cost=0.00..3,269.98 rows=81,401 width=0) (actual time=7.319..7.319 rows=118,243 loops=1)

  • index cond: ((t3.Период = '3999-11-01 00:00:00'::timestamp without time zone) and (t3.Склад = '\\x93538ca982e0f8c011e9b9b404815ebb'::bytea))
  • buffers: shared hit=973
7. 1.380 2.188 ↑ 1.0 10,586 1

hash (cost=194.86..194.86 rows=10,586 width=17) (actual time=2.188..2.188 rows=10,586 loops=1)

  • output: t4._q_001_f_000rref
  • buckets: 16384 batches: 1 memory usage: 635kb
  • buffers: local hit=89
8. 0.808 0.808 ↑ 1.0 10,586 1

seq scan on pg_temp_6.tt3 t4 (cost=0.00..194.86 rows=10,586 width=17) (actual time=0.010..0.808 rows=10,586 loops=1)

  • output: t4._q_001_f_000rref
  • buffers: local hit=89
9. 1.703 2.355 ↑ 1.0 10,586 1

hash (cost=194.86..194.86 rows=10,586 width=39) (actual time=2.355..2.355 rows=10,586 loops=1)

  • output: t1._q_001_f_000rref, t1._q_001_f_001, t1._q_001_f_002rref
  • buckets: 16384 batches: 1 memory usage: 862kb
  • buffers: local hit=89
10. 0.652 0.652 ↑ 1.0 10,586 1

seq scan on pg_temp_6.tt3 t1 (cost=0.00..194.86 rows=10,586 width=39) (actual time=0.011..0.652 rows=10,586 loops=1)

  • output: t1._q_001_f_000rref, t1._q_001_f_001, t1._q_001_f_002rref
  • buffers: local hit=89
Planning time : 0.389 ms
Execution time : 69.337 ms