explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cKI3

Settings
# exclusive inclusive rows x rows loops node
1. 4.860 194.103 ↑ 449.2 4 1

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

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

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

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

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

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

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

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

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

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

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

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

subquery scan on t3 (cost=25.98..26.25 rows=11 width=49) (actual time=0.062..0.065 rows=4 loops=1)

  • output: t3.q_001_f_001_, t3.q_001_f_000rref
  • buffers: shared hit=3
8. 0.027 0.065 ↑ 2.8 4 1

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

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

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

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

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

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