explain.depesz.com

PostgreSQL's explain analyze made readable

Result: guZ9

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 334.096 ↓ 0.0 0 1

GroupAggregate (cost=12,189.27..12,197.68 rows=177 width=403) (actual time=334.096..334.096 rows=0 loops=1)

  • Group Key: datielabap0_.cod_periodo, datielabap0_.cod_dest2, datielabap0_.cod_dest5
  • Filter: (abs(sum(datielabap0_.importo_cambio)) <> '0'::numeric)
  • Buffers: shared hit=58312
2. 0.030 334.094 ↓ 0.0 0 1

Sort (cost=12,189.27..12,189.71 rows=177 width=57) (actual time=334.093..334.094 rows=0 loops=1)

  • Sort Key: datielabap0_.cod_dest2, datielabap0_.cod_dest5
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=58312
3. 0.002 334.064 ↓ 0.0 0 1

Nested Loop (cost=5.29..12,182.66 rows=177 width=57) (actual time=334.063..334.064 rows=0 loops=1)

  • Buffers: shared hit=58309
4. 29.628 334.062 ↓ 0.0 0 1

Nested Loop (cost=5.14..12,124.03 rows=335 width=57) (actual time=334.062..334.062 rows=0 loops=1)

  • Buffers: shared hit=58309
5. 90.160 278.402 ↓ 36.2 26,032 1

Hash Join (cost=5.00..11,998.19 rows=719 width=57) (actual time=0.074..278.402 rows=26,032 loops=1)

  • Hash Cond: ((datielabap0_.cod_conto)::text = (appk1x3_.k1)::text)
  • Buffers: shared hit=6245
6. 188.205 188.205 ↓ 1.0 225,847 1

Seq Scan on consu datielabap0_ (cost=0.00..11,150.35 rows=222,840 width=57) (actual time=0.020..188.205 rows=225,847 loops=1)

  • Filter: (((cod_periodo)::text = '03'::text) AND ((cod_scenario)::text = 'BGT2019NO2'::text) AND ((cod_categoria)::text = 'REVENUE'::text) AND ((cod_regola)::text = ANY ('{01R,02,$R$f$}'::text[])))
  • Rows Removed by Filter: 5134
  • Buffers: shared hit=6242
7. 0.005 0.037 ↑ 1.0 1 1

Hash (cost=4.99..4.99 rows=1 width=9) (actual time=0.037..0.037 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
8. 0.032 0.032 ↑ 1.0 1 1

Seq Scan on consu_k1 appk1x3_ (cost=0.00..4.99 rows=1 width=9) (actual time=0.013..0.032 rows=1 loops=1)

  • Filter: ((cid)::text = 'FF8081816B1C9D4F016B1CC6861312A6'::text)
  • Rows Removed by Filter: 158
  • Buffers: shared hit=3
9. 26.032 26.032 ↓ 0.0 0 26,032

Index Scan using "PK_INDEX" on consu_k1 appk1x2_ (cost=0.14..0.17 rows=1 width=9) (actual time=0.001..0.001 rows=0 loops=26,032)

  • Index Cond: ((k1)::text = (datielabap0_.cod_azienda)::text)
  • Filter: ((cid)::text = 'FF8081816B1C9D4F016B1CC6A51412D1'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=52064
10. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_INDEX" on consu_k1 appk1x1_ (cost=0.14..0.17 rows=1 width=9) (never executed)

  • Index Cond: ((k1)::text = (datielabap0_.cod_dest5)::text)
  • Filter: ((cid)::text = 'FF8081816B1C9D4F016B1CC677311293'::text)