explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HTil

Settings
# exclusive inclusive rows x rows loops node
1. 1.004 92,300.425 ↓ 0.0 0 1

Nested Loop (cost=7,002.30..399,588.44 rows=1 width=8,568) (actual time=92,300.425..92,300.425 rows=0 loops=1)

2. 3.824 92,278.749 ↓ 1,088.0 1,088 1

Nested Loop (cost=7,001.87..399,587.17 rows=1 width=7,459) (actual time=1,317.646..92,278.749 rows=1,088 loops=1)

3. 40.114 92,254.272 ↓ 1,087.0 1,087 1

Nested Loop Left Join (cost=7,001.32..399,578.58 rows=1 width=6,382) (actual time=1,317.605..92,254.272 rows=1,087 loops=1)

  • Filter: ((((pf.importoeuro * ts.comm_rimborso) / '100'::numeric) * ('1'::numeric - round((COALESCE((fff.cdfasciacomm)::numeric, '0'::numeric) / '100'::numeric), 2))) > '0'::numeric)
  • Rows Removed by Filter: 18808
4. 36.401 92,114.683 ↓ 19,895.0 19,895 1

Nested Loop Left Join (cost=7,000.90..399,545.83 rows=1 width=6,344) (actual time=1,317.569..92,114.683 rows=19,895 loops=1)

5. 37.858 92,058.387 ↓ 19,895.0 19,895 1

Nested Loop (cost=7,000.61..399,545.36 rows=1 width=4,808) (actual time=1,317.557..92,058.387 rows=19,895 loops=1)

6. 41.055 91,817.599 ↓ 20,293.0 20,293 1

Nested Loop Left Join (cost=7,000.05..399,539.81 rows=1 width=4,661) (actual time=1,317.525..91,817.599 rows=20,293 loops=1)

7. 29,813.661 91,451.856 ↓ 20,293.0 20,293 1

Nested Loop (cost=6,999.19..399,530.41 rows=1 width=3,896) (actual time=1,317.482..91,451.856 rows=20,293 loops=1)

  • Join Filter: (((pf.codtipoazione)::bpchar = faf.cdtipoazione) AND ((pf.codfondo)::bigint = faf.cdfondoinvestimento))
  • Rows Removed by Join Filter: 143684849
8. 31.472 146.433 ↓ 890.3 5,342 1

Nested Loop (cost=362.09..2,278.19 rows=6 width=1,516) (actual time=2.833..146.433 rows=5,342 loops=1)

  • Join Filter: (((fr.divisaemissione)::character varying)::text = (ts.valuta_denom)::text)
  • Rows Removed by Join Filter: 396
9. 30.456 39.145 ↓ 5.2 5,832 1

Hash Join (cost=361.80..1,322.05 rows=1,119 width=687) (actual time=2.802..39.145 rows=5,832 loops=1)

  • Hash Cond: ((faf.cdfondoinvestimento = fr.cdfondoinvestimento) AND (faf.cdtipoazione = fr.cdtipoazione))
10. 5.921 5.921 ↑ 1.0 11,623 1

Seq Scan on fondi_tipo_azione faf (cost=0.00..899.23 rows=11,623 width=574) (actual time=0.007..5.921 rows=11,623 loops=1)

11. 1.714 2.768 ↑ 1.0 5,832 1

Hash (cost=274.32..274.32 rows=5,832 width=113) (actual time=2.767..2.768 rows=5,832 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 905kB
12. 1.054 1.054 ↑ 1.0 5,832 1

Seq Scan on fondi_ricerca fr (cost=0.00..274.32 rows=5,832 width=113) (actual time=0.007..1.054 rows=5,832 loops=1)

13. 75.816 75.816 ↑ 1.0 1 5,832

Index Scan using tabella_sinottica_isin_portatore_index on tabella_sinottica ts (cost=0.29..0.84 rows=1 width=829) (actual time=0.012..0.013 rows=1 loops=5,832)

  • Index Cond: ((isin_portatore)::text = ((faf.isincumulativo)::character varying)::text)
14. 60,277.728 61,491.762 ↓ 289.3 26,901 5,342

Materialize (cost=6,637.11..397,241.29 rows=93 width=2,380) (actual time=0.013..11.511 rows=26,901 loops=5,342)

15. 5.293 1,214.034 ↓ 289.3 26,901 1

Gather (cost=6,637.11..397,240.82 rows=93 width=2,380) (actual time=52.286..1,214.034 rows=26,901 loops=1)

  • Workers Planned: 4
  • Workers Launched: 0
16. 29.372 1,208.741 ↓ 1,169.6 26,901 1

Nested Loop Left Join (cost=5,637.11..396,231.52 rows=23 width=2,380) (actual time=50.902..1,208.741 rows=26,901 loops=1)

17. 1,146.209 1,179.368 ↓ 1,169.6 26,901 1

Parallel Bitmap Heap Scan on pks_fondi pf (cost=5,636.82..396,050.34 rows=23 width=1,282) (actual time=50.891..1,179.368 rows=26,901 loops=1)

  • Recheck Cond: (dtacontratto > '2019-03-04'::date)
  • Filter: (((((metadati -> 'marchiaturaCompliance'::text) -> 'WID02'::text) ->> '520'::text) IS NULL) AND ((codcausale)::text = ANY ('{RIM,RIZ,RI1,RLE,RLF,RLP,RLQ,RPA,RPI,RPP}'::text[])))
  • Rows Removed by Filter: 163713
  • Heap Blocks: exact=95099
18. 33.159 33.159 ↓ 1.0 190,949 1

Bitmap Index Scan on index_dtacontratto_pks_fondi (cost=0.00..5,636.79 rows=181,915 width=0) (actual time=33.159..33.159 rows=190,949 loops=1)

  • Index Cond: (dtacontratto > '2019-03-04'::date)
19. 0.001 0.001 ↓ 0.0 0 26,901

Index Scan using pks_pac_pkey on pks_pac pp (cost=0.29..7.88 rows=1 width=1,098) (actual time=0.001..0.001 rows=0 loops=26,901)

  • Index Cond: (cod_piano_sottoscritto = pf.codpiano)
20. 20.293 324.688 ↑ 1.0 1 20,293

Nested Loop Left Join (cost=0.86..9.39 rows=1 width=765) (actual time=0.016..0.016 rows=1 loops=20,293)

21. 162.344 162.344 ↑ 1.0 1 20,293

Index Scan using index_codmov_pks_pagamento_fondi on pks_pagamento_fondi ppf (cost=0.43..8.40 rows=1 width=286) (actual time=0.007..0.008 rows=1 loops=20,293)

  • Index Cond: (codmov = pf.codmov)
22. 142.051 142.051 ↑ 1.0 1 20,293

Index Scan using pks_coord_banc_pkey on pks_coord_banc_it pcb (cost=0.43..0.99 rows=1 width=479) (actual time=0.007..0.007 rows=1 loops=20,293)

  • Index Cond: (coord_banca_it = ppf.coordbancariait)
23. 202.930 202.930 ↑ 4.0 1 20,293

Index Scan using pks_stato_fondo_pkey on pks_stato_fondo psf (cost=0.56..20.51 rows=4 width=147) (actual time=0.010..0.010 rows=1 loops=20,293)

  • Index Cond: ((cod_mov = pf.codmov) AND ((cod_stato)::text = 'ROS'::text))
24. 19.895 19.895 ↓ 0.0 0 19,895

Index Scan using pks_elenco_modelli_pac_pkey on pks_elenco_modelli_pac pemd (cost=0.28..0.48 rows=1 width=1,536) (actual time=0.001..0.001 rows=0 loops=19,895)

  • Index Cond: (cod_modello = pp.cod_modello)
25. 99.475 99.475 ↓ 0.0 0 19,895

Index Scan using fondi_fasce_fkidx1 on fondi_fasce fff (cost=0.42..32.72 rows=1 width=38) (actual time=0.005..0.005 rows=0 loops=19,895)

  • Index Cond: (cdfondoinvestimento = (pf.codfondo)::bigint)
  • Filter: ((cdfasciacomm)::numeric = pf.codscontocommiss)
  • Rows Removed by Filter: 7
26. 20.653 20.653 ↑ 1.0 1 1,087

Index Scan using id_rapport_idx on rapporti r (cost=0.56..8.57 rows=1 width=1,077) (actual time=0.019..0.019 rows=1 loops=1,087)

  • Index Cond: ((idrapporto)::text = (pf.idrapporto)::text)
27. 20.672 20.672 ↓ 0.0 0 1,088

Index Scan using rapportiid on rapporti rr (cost=0.43..1.24 rows=1 width=1,077) (actual time=0.019..0.019 rows=0 loops=1,088)

  • Index Cond: (internalid = r.intestazione)
  • Filter: ((metadati ->> 'promotore'::text) = 'stefano.pieracciani'::text)
  • Rows Removed by Filter: 1