explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 68TH : Optimization for: Optimization for: Optimization for: plan #WwGg; plan #6hnV; plan #JowT

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 0.071 ↓ 0.0 0 1

Limit (cost=56.31..56.36 rows=1 width=213) (actual time=0.071..0.071 rows=0 loops=1)

2. 0.000 0.070 ↓ 0.0 0 1

Unique (cost=56.31..56.36 rows=1 width=213) (actual time=0.070..0.070 rows=0 loops=1)

3. 0.021 0.070 ↓ 0.0 0 1

Sort (cost=56.31..56.32 rows=1 width=213) (actual time=0.070..0.070 rows=0 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.000 0.049 ↓ 0.0 0 1

Nested Loop Left Join (cost=5.95..56.30 rows=1 width=213) (actual time=0.049..0.049 rows=0 loops=1)

5. 0.000 0.049 ↓ 0.0 0 1

Nested Loop Left Join (cost=5.68..55.25 rows=1 width=235) (actual time=0.049..0.049 rows=0 loops=1)

6. 0.000 0.049 ↓ 0.0 0 1

Nested Loop (cost=5.42..54.20 rows=1 width=224) (actual time=0.049..0.049 rows=0 loops=1)

7. 0.001 0.049 ↓ 0.0 0 1

Nested Loop Left Join (cost=5.14..45.90 rows=1 width=208) (actual time=0.049..0.049 rows=0 loops=1)

  • Join Filter: (ipa7_.config_siope_id = ipaconfigs10_.id)
8. 0.000 0.048 ↓ 0.0 0 1

Nested Loop (cost=5.14..44.63 rows=1 width=128) (actual time=0.048..0.048 rows=0 loops=1)

9. 0.000 0.048 ↓ 0.0 0 1

Nested Loop (cost=5.14..42.47 rows=1 width=106) (actual time=0.048..0.048 rows=0 loops=1)

10. 0.001 0.048 ↓ 0.0 0 1

Nested Loop (cost=5.14..41.15 rows=1 width=68) (actual time=0.048..0.048 rows=0 loops=1)

11. 0.000 0.047 ↓ 0.0 0 1

Nested Loop (cost=5.14..39.88 rows=1 width=53) (actual time=0.047..0.047 rows=0 loops=1)

12. 0.000 0.047 ↓ 0.0 0 1

Nested Loop (cost=4.87..31.58 rows=1 width=16) (actual time=0.047..0.047 rows=0 loops=1)

13. 0.002 0.047 ↓ 0.0 0 1

Nested Loop (cost=4.58..23.84 rows=1 width=16) (actual time=0.047..0.047 rows=0 loops=1)

14. 0.011 0.011 ↑ 1.0 1 1

Index Scan using pacchetto_esercizio_idx on pacchetto pacchetto6_ (cost=0.28..8.53 rows=1 width=16) (actual time=0.008..0.011 rows=1 loops=1)

  • Index Cond: (esercizio = 2018)
  • Filter: (ipa_id = 11340756)
  • Rows Removed by Filter: 2
15. 0.026 0.034 ↓ 0.0 0 1

Bitmap Heap Scan on vers_ord versioneor5_ (cost=4.31..15.29 rows=1 width=16) (actual time=0.034..0.034 rows=0 loops=1)

  • Recheck Cond: (pacchetto_id = pacchetto6_.id)
  • Filter: (esercizio = 2018)
  • Rows Removed by Filter: 18
  • Heap Blocks: exact=17
16. 0.008 0.008 ↓ 6.0 18 1

Bitmap Index Scan on idx_vers_ord_search_pac (cost=0.00..4.30 rows=3 width=0) (actual time=0.008..0.008 rows=18 loops=1)

  • Index Cond: (pacchetto_id = pacchetto6_.id)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_ric_appl_search_ord on ric_appl ricevutaap1_ (cost=0.28..7.73 rows=1 width=16) (never executed)

  • Index Cond: (ordinativo_id = versioneor5_.id)
  • Filter: (esercizio = 2018)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ric_acc on ric_acc ricevutaac0_ (cost=0.28..8.29 rows=1 width=45) (never executed)

  • Index Cond: (id = ricevutaap1_.ricevuta_accorpata_id)
  • Filter: (esercizio = 2018)
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on ipa ipa7_ (cost=0.00..1.25 rows=1 width=31) (never executed)

  • Filter: ((id = 11340756) AND (ente_id = 11340056))
20. 0.000 0.000 ↓ 0.0 0

Seq Scan on ente ente8_ (cost=0.00..1.31 rows=1 width=46) (never executed)

  • Filter: ((id = 11340056) AND (banca_id = 10863051))
21. 0.000 0.000 ↓ 0.0 0

Seq Scan on banca banca9_ (cost=0.00..2.15 rows=1 width=30) (never executed)

  • Filter: (id = 10863051)
22. 0.000 0.000 ↓ 0.0 0

Seq Scan on ipa_cfg_siope ipaconfigs10_ (cost=0.00..1.12 rows=12 width=96) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ric_acc_zip on ric_acc_zip ricevutaac2_ (cost=0.28..8.29 rows=1 width=24) (never executed)

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

Index Scan using pk_conserv_documento on conserv_documento conservazi3_ (cost=0.27..1.03 rows=1 width=19) (never executed)

  • Index Cond: (ricevutaac2_.cons_doc_banca_id = id)
  • Filter: ((tipo_documento)::text = 'RICEVUTA_APPLICATIVA'::text)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_conserv_documento on conserv_documento conservazi4_ (cost=0.27..1.03 rows=1 width=19) (never executed)

  • Index Cond: (ricevutaac2_.cons_doc_ente_id = id)
  • Filter: ((tipo_documento)::text = 'RICEVUTA_APPLICATIVA'::text)