explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1kXw

Settings
# exclusive inclusive rows x rows loops node
1. 7.799 213.420 ↑ 168.2 10,586 1

"hash right join (cost=17,025.27..18,105.67 rows=1,780,243 width=81) (actual time=159.490..213.420 rows=10,586 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=2380, temp read=463 written=463
2. 36.273 192.596 ↓ 1.8 60,000 1

groupaggregate (cost=16,279.18..16,996.76 rows=32,680 width=49) (actual time=146.404..192.596 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. 120.760 156.323 ↓ 1.5 118,243 1

sort (cost=16,279.18..16,360.53 rows=81,356 width=22) (actual time=146.393..156.323 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.180 35.563 ↓ 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=7.493..35.563 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.383 7.383 ↓ 1.5 118,243 1

bitmap index scan on _1 (cost=0.00..3,269.98 rows=81,401 width=0) (actual time=7.383..7.383 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. 1.729 13.025 ↑ 1.0 10,586 1

hash (cost=626.25..626.25 rows=10,895 width=49) (actual time=13.025..13.025 rows=10,586 loops=1)

  • output: t3.q_001_f_001_, t3.q_001_f_000rref
  • buckets: 16384 batches: 1 memory usage: 687kb
  • buffers: shared hit=187
7. 0.680 11.296 ↑ 1.0 10,586 1

subquery scan on t3 (cost=397.45..626.25 rows=10,895 width=49) (actual time=7.927..11.296 rows=10,586 loops=1)

  • output: t3.q_001_f_001_, t3.q_001_f_000rref
  • buffers: shared hit=187
8. 8.604 10.616 ↑ 1.0 10,586 1

hashaggregate (cost=397.45..517.30 rows=10,895 width=49) (actual time=7.926..10.616 rows=10,586 loops=1)

  • output: t4.Товар, sum(t4.Количество)
  • group key: t4.Товар
  • buffers: shared hit=187
9. 2.012 2.012 ↑ 1.0 15,000 1

seq scan on public.Документ.РеализацияТоваров.Товары t4 (cost=0.00..367.45 rows=15,000 width=22) (actual time=0.014..2.012 rows=15,000 loops=1)

  • output: t4.Ссылка, t4._keyfield, t4._lineno35, t4.Товар, t4.Количество, t4._fld38, t4._fld39
  • filter: (t4.Ссылка = '\\x93538ca982e0f8c011e9b9486fc8d634'::bytea)
  • rows removed by filter: 1405
  • buffers: shared hit=187
Planning time : 0.203 ms
Execution time : 219.731 ms