explain.depesz.com

PostgreSQL's explain analyze made readable

Result: orma : Matrix2

Settings
# exclusive inclusive rows x rows loops node
1. 9,395.522 157,931.158 ↓ 4.2 56,927 1

GroupAggregate (cost=1,121,943.80..1,122,784.93 rows=13,458 width=197) (actual time=131,778.184..157,931.158 rows=56,927 loops=1)

  • Group Key: fact_tab.cod_categoria, app_cat05101398245682252845.tipo_periodicizzazione, app_cat05101398245682252845.tipo_categoria, fact_tab.cod_scenario, fact_tab.cod_periodo, fact_tab.cod_conto, app_conto051013595368430906.natura_conto, app_conto051013595368430906.tipo_conto, app_conto051013595368430906.tipo_conversione, fact_tab.cod_dest1, app_k2051013758380119010993.k1, fact_tab.cod_dest3, app_k2051013617050642105276.k1, fact_tab.cod_azienda, fact_tab.cod_valuta, fact_tab.cod_valuta_originaria
  • Buffers: shared hit=12845900, temp read=160544 written=160544
2. 78,611.697 148,535.636 ↓ 611.4 8,228,376 1

Sort (cost=1,121,943.80..1,121,977.45 rows=13,458 width=147) (actual time=131,778.023..148,535.636 rows=8,228,376 loops=1)

  • Sort Key: fact_tab.cod_categoria, app_cat05101398245682252845.tipo_periodicizzazione, app_cat05101398245682252845.tipo_categoria, fact_tab.cod_scenario, fact_tab.cod_periodo, fact_tab.cod_conto, app_conto051013595368430906.natura_conto, app_conto051013595368430906.tipo_conto, app_conto051013595368430906.tipo_conversione, fact_tab.cod_dest1, app_k2051013758380119010993.k1, app_k2051013617050642105276.k1, fact_tab.cod_valuta, fact_tab.cod_valuta_originaria
  • Sort Method: external merge Disk: 1284208kB
  • Buffers: shared hit=12845900, temp read=160544 written=160544
3. 6,707.363 69,923.939 ↓ 611.4 8,228,376 1

Hash Join (cost=65.72..1,121,020.84 rows=13,458 width=147) (actual time=12.872..69,923.939 rows=8,228,376 loops=1)

  • Hash Cond: ((fact_tab.cod_dest1)::text = (app_k1051013621714436976565.k1)::text)
  • Buffers: shared hit=12845900
4. 6,857.191 63,215.677 ↓ 611.4 8,228,376 1

Hash Join (cost=32.05..1,120,802.12 rows=13,458 width=147) (actual time=11.954..63,215.677 rows=8,228,376 loops=1)

  • Hash Cond: ((fact_tab.cod_conto)::text = (app_conto051013595368430906.k1)::text)
  • Buffers: shared hit=12845892
5. 5,559.242 56,357.745 ↓ 629.1 8,466,020 1

Hash Join (cost=6.99..1,120,592.01 rows=13,458 width=141) (actual time=11.192..56,357.745 rows=8,466,020 loops=1)

  • Hash Cond: ((fact_tab.cod_dest2)::text = (app_k2051013758380119010993.k2)::text)
  • Buffers: shared hit=12845886
6. 4,307.050 50,798.355 ↓ 620.3 4,233,010 1

Nested Loop (cost=0.85..1,120,417.16 rows=6,824 width=141) (actual time=11.021..50,798.355 rows=4,233,010 loops=1)

  • Buffers: shared hit=12845884
7. 12,386.098 40,141.790 ↓ 620.3 2,116,505 1

Nested Loop (cost=0.57..1,109,790.61 rows=3,412 width=133) (actual time=11.002..40,141.790 rows=2,116,505 loops=1)

  • Join Filter: ((fact_tab.cod_categoria)::text = (app_cat05101398245682252845.k1)::text)
  • Rows Removed by Join Filter: 16803161
  • Buffers: shared hit=4638010
8. 6,588.728 18,295.859 ↓ 231.0 9,459,833 1

Nested Loop (cost=0.57..1,108,561.15 rows=40,948 width=128) (actual time=0.073..18,295.859 rows=9,459,833 loops=1)

  • Buffers: shared hit=4638009
9. 0.027 0.027 ↑ 5.8 12 1

Seq Scan on app_sce_per0510137284728229 (cost=0.00..10.70 rows=70 width=1,032) (actual time=0.003..0.027 rows=12 loops=1)

  • Buffers: shared hit=1
10. 11,707.104 11,707.104 ↓ 99.0 788,319 12

Index Scan using ix_dati_saldi_lordi_01 on dati_saldi_lordi fact_tab (cost=0.57..15,756.81 rows=7,962 width=128) (actual time=0.030..975.592 rows=788,319 loops=12)

  • Index Cond: (((cod_scenario)::text = (app_sce_per0510137284728229.cod_scenario)::text) AND ((cod_scenario)::text = ANY ('{2019_ACT,2018_ACT}'::text[])) AND ((cod_periodo)::text = (app_sce_per0510137284728229.cod_periodo)::text) AND ((cod_periodo)::text = ANY ('{03,04,02,05,01,06}'::text[])) AND ((cod_azienda)::text = 'ETI_4630'::text))
  • Filter: ((cod_dest3)::text = 'BUS_TYP_DOMESTIC'::text)
  • Rows Removed by Filter: 88817
  • Buffers: shared hit=4638005
11. 9,459.829 9,459.833 ↑ 1.0 2 9,459,833

Materialize (cost=0.00..1.03 rows=2 width=16) (actual time=0.000..0.001 rows=2 loops=9,459,833)

  • Buffers: shared hit=1
12. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on app_cat05101398245682252845 (cost=0.00..1.02 rows=2 width=16) (actual time=0.002..0.004 rows=2 loops=1)

  • Buffers: shared hit=1
13. 6,349.515 6,349.515 ↑ 1.0 2 2,116,505

Index Scan using hfoyqgmtiooheqjv on app_k2051013617050642105276 (cost=0.28..3.09 rows=2 width=28) (actual time=0.002..0.003 rows=2 loops=2,116,505)

  • Index Cond: ((k2)::text = (fact_tab.cod_dest5)::text)
  • Buffers: shared hit=8207874
14. 0.080 0.148 ↑ 1.0 184 1

Hash (cost=3.84..3.84 rows=184 width=42) (actual time=0.148..0.148 rows=184 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
  • Buffers: shared hit=2
15. 0.068 0.068 ↑ 1.0 184 1

Seq Scan on app_k2051013758380119010993 (cost=0.00..3.84 rows=184 width=42) (actual time=0.009..0.068 rows=184 loops=1)

  • Buffers: shared hit=2
16. 0.413 0.741 ↑ 1.0 847 1

Hash (cost=14.47..14.47 rows=847 width=17) (actual time=0.741..0.741 rows=847 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
  • Buffers: shared hit=6
17. 0.328 0.328 ↑ 1.0 847 1

Seq Scan on app_conto051013595368430906 (cost=0.00..14.47 rows=847 width=17) (actual time=0.008..0.328 rows=847 loops=1)

  • Buffers: shared hit=6
18. 0.504 0.899 ↑ 1.0 1,141 1

Hash (cost=19.41..19.41 rows=1,141 width=16) (actual time=0.899..0.899 rows=1,141 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 70kB
  • Buffers: shared hit=8
19. 0.395 0.395 ↑ 1.0 1,141 1

Seq Scan on app_k1051013621714436976565 (cost=0.00..19.41 rows=1,141 width=16) (actual time=0.009..0.395 rows=1,141 loops=1)

  • Buffers: shared hit=8
Planning time : 7.680 ms