explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qvju

Settings
# exclusive inclusive rows x rows loops node
1. 4.568 193.346 ↑ 449.2 4 1

"hash right join (cost=16,305.54..17,385.95 rows=1,797 width=81) (actual time=150.367..193.346 rows=4 loops=1)

  • output: (sum(t4.Количество)), t1.q_001_f_001_, t1.q_001_f_000rref
  • inner unique: true
  • hash cond: (t4.Товар = t1.q_001_f_000rref)
  • buffers: shared hit=2196, temp read=463 written=463
2. 37.585 188.738 ↓ 1.8 60,000 1

groupaggregate (cost=16,279.18..16,996.76 rows=32,680 width=49) (actual time=141.344..188.738 rows=60,000 loops=1)

  • output: t4.Товар, sum(t4.Количество)
  • group key: t4.Товар
  • filter: (sum(t4.Количество) <> '0'::numeric)
  • buffers: shared hit=2193, temp read=463 written=463
3. 115.035 151.153 ↓ 1.5 118,243 1

sort (cost=16,279.18..16,360.53 rows=81,356 width=22) (actual time=141.331..151.153 rows=118,243 loops=1)

  • output: t4.Товар, t4.Количество
  • sort key: t4.Товар
  • sort method: external sort disk: 3704kb
  • buffers: shared hit=2193, temp read=463 written=463
4. 28.217 36.118 ↓ 1.5 118,243 1

bitmap heap scan on public. t4 (cost=3,278.11..12,859.73 rows=81,356 width=22) (actual time=8.016..36.118 rows=118,243 loops=1)

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

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

  • index cond: ((t4.Период = '3999-11-01 00:00:00'::timestamp without time zone) and (t4.Склад = '\\x93538ca982e0f8c011e9b9b404815ebb'::bytea))
  • buffers: shared hit=973
6. 0.007 0.040 ↑ 2.8 4 1

hash (cost=26.25..26.25 rows=11 width=49) (actual time=0.040..0.040 rows=4 loops=1)

  • output: t1.q_001_f_001_, t1.q_001_f_000rref
  • buckets: 1024 batches: 1 memory usage: 9kb
  • buffers: shared hit=3
7. 0.001 0.033 ↑ 2.8 4 1

subquery scan on t1 (cost=25.98..26.25 rows=11 width=49) (actual time=0.029..0.033 rows=4 loops=1)

  • output: t1.q_001_f_001_, t1.q_001_f_000rref
  • buffers: shared hit=3
8. 0.007 0.032 ↑ 2.8 4 1

groupaggregate (cost=25.98..26.14 rows=11 width=49) (actual time=0.029..0.032 rows=4 loops=1)

  • output: t2.Товар, sum(t2.Количество)
  • group key: t2.Товар
  • buffers: shared hit=3
9. 0.010 0.025 ↑ 1.0 11 1

sort (cost=25.98..25.99 rows=11 width=22) (actual time=0.025..0.025 rows=11 loops=1)

  • output: t2.Товар, t2.Количество
  • sort key: t2.Товар
  • sort method: quicksort memory: 25kb
  • buffers: shared hit=3
10. 0.015 0.015 ↑ 1.0 11 1

index scan using Документ.РеализацияТоваров.Товары_sk on public.Документ.РеализацияТоваров.Товары t2 (cost=0.12..25.79 rows=11 width=22) (actual time=0.013..0.015 rows=11 loops=1)

  • output: t2.Товар, t2.Количество
  • index cond: (t2.Ссылка = '\\x93538ca982e0f8c011e9b9445ec15a6a'::bytea)
  • buffers: shared hit=3
Planning time : 0.298 ms
Execution time : 197.804 ms