explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WwGg

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.318 ↑ 2.0 1 1

Limit (cost=241.44..241.53 rows=2 width=213) (actual time=0.314..0.318 rows=1 loops=1)

2. 0.005 0.318 ↑ 2.0 1 1

Unique (cost=241.44..241.53 rows=2 width=213) (actual time=0.314..0.318 rows=1 loops=1)

3. 0.068 0.313 ↑ 1.0 2 1

Sort (cost=241.44..241.44 rows=2 width=213) (actual time=0.313..0.313 rows=2 loops=1)

  • Sort Key: ricevutaac0_.id DESC, banca9_.abi, ente8_.codente, ente8_.descrizione, ipa7_.codice_ipa, ricevutaac0_.data_creazione, ipaconfigs10_.utenza_a_2_a, ricevutaac0_.ricevuta_zip_id, banca9_.descrizione, ricevutaac0_.id_connettore, ricevutaac0_.numero_ricevute, ricevutaac0_.stato_easysiope, (CASE WHEN ((conservazi3_.id IS NOT NULL) AND ((conservazi3_.stato_conserv_documento)::text = 'INVIATO'::text)) THEN true ELSE false END), (CASE WHEN ((conservazi4_.id IS NOT NULL) AND ((conservazi4_.stato_conserv_documento)::text = 'INVIATO'::text)) THEN true ELSE false END), (CASE WHEN ((conservazi3_.id IS NOT NULL) AND ((conservazi3_.stato_conserv_documento)::text = 'ARCHIVIATO'::text)) THEN true ELSE false END), (CASE WHEN ((conservazi4_.id IS NOT NULL) AND ((conservazi4_.stato_conserv_documento)::text = 'ARCHIVIATO'::text)) THEN true ELSE false END), (CASE WHEN ((conservazi3_.id IS NOT NULL) OR (conservazi4_.id IS NOT NULL)) THEN true ELSE false END)
  • Sort Method: quicksort Memory: 25kB
4. 0.003 0.245 ↑ 1.0 2 1

Nested Loop Left Join (cost=5.73..241.43 rows=2 width=213) (actual time=0.096..0.245 rows=2 loops=1)

5. 0.001 0.240 ↑ 1.0 2 1

Nested Loop Left Join (cost=5.46..239.33 rows=2 width=235) (actual time=0.093..0.240 rows=2 loops=1)

6. 0.002 0.239 ↑ 1.0 2 1

Nested Loop (cost=5.20..237.25 rows=2 width=224) (actual time=0.092..0.239 rows=2 loops=1)

7. 0.001 0.233 ↑ 1.0 2 1

Nested Loop (cost=4.92..220.64 rows=2 width=208) (actual time=0.089..0.233 rows=2 loops=1)

8. 0.006 0.038 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.00..6.01 rows=1 width=171) (actual time=0.031..0.038 rows=1 loops=1)

  • Join Filter: (ipa7_.config_siope_id = ipaconfigs10_.id)
  • Rows Removed by Join Filter: 18
9. 0.000 0.025 ↑ 1.0 1 1

Nested Loop (cost=0.00..4.74 rows=1 width=91) (actual time=0.019..0.025 rows=1 loops=1)

10. 0.001 0.018 ↑ 1.0 1 1

Nested Loop (cost=0.00..2.58 rows=1 width=69) (actual time=0.015..0.018 rows=1 loops=1)

11. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on ipa ipa7_ (cost=0.00..1.25 rows=1 width=31) (actual time=0.008..0.010 rows=1 loops=1)

  • Filter: ((id = 11340756) AND (ente_id = 11340056))
  • Rows Removed by Filter: 16
12. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on ente ente8_ (cost=0.00..1.31 rows=1 width=46) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: ((id = 11340056) AND (banca_id = 10863051))
  • Rows Removed by Filter: 20
13. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on banca banca9_ (cost=0.00..2.15 rows=1 width=30) (actual time=0.004..0.007 rows=1 loops=1)

  • Filter: (id = 10863051)
  • Rows Removed by Filter: 11
14. 0.007 0.007 ↓ 1.6 19 1

Seq Scan on ipa_cfg_siope ipaconfigs10_ (cost=0.00..1.12 rows=12 width=96) (actual time=0.006..0.007 rows=19 loops=1)

15. 0.002 0.194 ↑ 1.0 2 1

Nested Loop (cost=4.92..214.61 rows=2 width=53) (actual time=0.057..0.194 rows=2 loops=1)

16. 0.008 0.178 ↑ 5.4 7 1

Nested Loop (cost=4.64..198.36 rows=38 width=53) (actual time=0.026..0.178 rows=7 loops=1)

17. 0.005 0.156 ↑ 5.4 7 1

Nested Loop (cost=4.36..180.70 rows=38 width=53) (actual time=0.021..0.156 rows=7 loops=1)

18. 0.127 0.127 ↑ 1.0 4 1

Seq Scan on ric_acc ricevutaac0_ (cost=0.00..29.54 rows=4 width=45) (actual time=0.005..0.127 rows=4 loops=1)

  • Filter: (esercizio = 2018)
  • Rows Removed by Filter: 679
19. 0.012 0.024 ↑ 5.0 2 4

Bitmap Heap Scan on ric_appl ricevutaap1_ (cost=4.36..37.69 rows=10 width=16) (actual time=0.005..0.006 rows=2 loops=4)

  • Recheck Cond: (ricevuta_accorpata_id = ricevutaac0_.id)
  • Heap Blocks: exact=5
20. 0.012 0.012 ↑ 5.0 2 4

Bitmap Index Scan on idx_ric_appl_ric_acc (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=2 loops=4)

  • Index Cond: (ricevuta_accorpata_id = ricevutaac0_.id)
21. 0.014 0.014 ↑ 1.0 1 7

Index Scan using pk_vers_ord on vers_ord versioneor5_ (cost=0.28..0.45 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: (id = ricevutaap1_.ordinativo_id)
22. 0.014 0.014 ↓ 0.0 0 7

Index Scan using pk_pacchetto on pacchetto pacchetto6_ (cost=0.28..0.42 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=7)

  • Index Cond: (id = versioneor5_.pacchetto_id)
  • Filter: (ipa_id = 11340756)
  • Rows Removed by Filter: 1
23. 0.004 0.004 ↑ 1.0 1 2

Index Scan using pk_ric_acc_zip on ric_acc_zip ricevutaac2_ (cost=0.28..8.29 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=2)

  • Index Cond: (id = ricevutaac0_.ricevuta_zip_id)
24. 0.000 0.000 ↓ 0.0 0 2

Index Scan using pk_conserv_documento on conserv_documento conservazi3_ (cost=0.27..1.03 rows=1 width=19) (actual time=0.000..0.000 rows=0 loops=2)

  • Index Cond: (ricevutaac2_.cons_doc_banca_id = id)
25. 0.002 0.002 ↓ 0.0 0 2

Index Scan using pk_conserv_documento on conserv_documento conservazi4_ (cost=0.27..1.03 rows=1 width=19) (actual time=0.001..0.001 rows=0 loops=2)

  • Index Cond: (ricevutaac2_.cons_doc_ente_id = id)