explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eFQB

Settings
# exclusive inclusive rows x rows loops node
1. 4.569 193.102 ↑ 449.2 4 1

"hash right join (cost=16,305.54..17,385.95 rows=1,797 width=81) (actual time=149.198..193.102 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.539 188.499 ↓ 1.8 60,000 1

groupaggregate (cost=16,279.18..16,996.76 rows=32,680 width=49) (actual time=140.997..188.499 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. 113.298 150.960 ↓ 1.5 118,243 1

sort (cost=16,279.18..16,360.53 rows=81,356 width=22) (actual time=140.987..150.960 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.107 37.662 ↓ 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=9.671..37.662 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. 9.555 9.555 ↓ 1.5 118,243 1

bitmap index scan on _1 (cost=0.00..3,269.98 rows=81,401 width=0) (actual time=9.555..9.555 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.002 0.034 ↑ 2.8 4 1

hash (cost=26.25..26.25 rows=11 width=49) (actual time=0.034..0.034 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.032 ↑ 2.8 4 1

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

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

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

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

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

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

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

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