explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qOlK

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Insert on permessi (cost=3,161.64..5,017.03 rows=1 width=2,602) (actual rows= loops=)

2.          

Initplan (for Insert)

3. 0.000 0.000 ↓ 0.0

Seq Scan on tipo_oggetti (cost=0.00..1.12 rows=1 width=4) (actual rows= loops=)

  • Filter: ((id_tipo_oggetto)::text = 'PROTOCOLLO'::text)
4. 0.000 0.000 ↓ 0.0

Seq Scan on tipo_oggetti tipo_oggetti_1 (cost=0.00..1.12 rows=1 width=4) (actual rows= loops=)

  • Filter: ((id_tipo_oggetto)::text = 'DETERMINA'::text)
5. 0.000 0.000 ↓ 0.0

Seq Scan on tipo_oggetti tipo_oggetti_2 (cost=0.00..1.12 rows=1 width=4) (actual rows= loops=)

  • Filter: ((id_tipo_oggetto)::text = 'DELIBERA'::text)
6. 0.000 0.000 ↓ 0.0

Seq Scan on tipo_oggetti tipo_oggetti_3 (cost=0.00..1.12 rows=1 width=4) (actual rows= loops=)

  • Filter: ((id_tipo_oggetto)::text = 'FASCICOLO'::text)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3,157.14..5,012.53 rows=1 width=2,602) (actual rows= loops=)

  • Join Filter: (p.id_predicato = pre.id)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3,157.14..5,010.20 rows=1 width=45) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3,156.86..5,009.10 rows=1 width=45) (actual rows= loops=)

  • Join Filter: (s.id = mappa_id_strutture.id_struttura_organigramma)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,859.28..4,655.87 rows=1 width=29) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,859.00..4,655.58 rows=1 width=25) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,858.59..4,654.31 rows=1 width=29) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,858.30..4,653.90 rows=1 width=17) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,858.01..4,653.55 rows=1 width=17) (actual rows= loops=)

  • Hash Cond: (eo.id_tipo_entita = teo.id)
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,835.25..4,630.48 rows=78 width=21) (actual rows= loops=)

  • Hash Cond: (eo.id = p.id_oggetto)
16. 0.000 0.000 ↓ 0.0

Seq Scan on bb_entita eo (cost=0.00..1,443.33 rows=93,633 width=12) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=2,834.27..2,834.27 rows=78 width=17) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,827.75..2,834.27 rows=78 width=17) (actual rows= loops=)

  • Hash Cond: (p.id_soggetto = es.id)
19. 0.000 0.000 ↓ 0.0

Seq Scan on bb_permessi p (cost=0.00..947.38 rows=15,564 width=17) (actual rows= loops=)

  • Filter: ((tipo = ANY ('{FLUSSO,FASCIOLO}'::text[])) AND ((ambito)::text = ANY ('{PICO,DETE,DELI,GEDI}'::text[])) AND ((attivo_dal IS NULL) OR (attivo_dal < now())) AND ((attivo_al IS NULL) OR (attivo_al > now())))
20. 0.000 0.000 ↓ 0.0

Hash (cost=1,821.90..1,821.90 rows=468 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=22.76..1,821.90 rows=468 width=8) (actual rows= loops=)

  • Hash Cond: (es.id_tipo_entita = tes.id)
22. 0.000 0.000 ↓ 0.0

Seq Scan on bb_entita es (cost=0.00..1,443.33 rows=93,633 width=12) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash (cost=22.75..22.75 rows=1 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on bb_tipi_entita tes (cost=0.00..22.75 rows=1 width=4) (actual rows= loops=)

  • Filter: ((target_schema = 'baborg'::text) AND (target_table = 'utenti'::text))
25. 0.000 0.000 ↓ 0.0

Hash (cost=22.75..22.75 rows=1 width=4) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on bb_tipi_entita teo (cost=0.00..22.75 rows=1 width=4) (actual rows= loops=)

  • Filter: ((target_schema = 'baborg'::text) AND (target_table = 'strutture'::text))
27. 0.000 0.000 ↓ 0.0

Index Scan using utente_pk on utenti ui (cost=0.29..0.35 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = es.id_provenienza)
28. 0.000 0.000 ↓ 0.0

Index Scan using persone_pkey on persone pers (cost=0.29..0.42 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = ui.id_persona)
29. 0.000 0.000 ↓ 0.0

Index Scan using utenti_cf_idx on utenti u (cost=0.41..1.26 rows=1 width=29) (actual rows= loops=)

  • Index Cond: (cf = (pers.codice_fiscale)::bpchar)
  • Filter: (attivo <> 0)
30. 0.000 0.000 ↓ 0.0

Index Only Scan using struttura_pk on strutture s (cost=0.28..0.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = eo.id_provenienza)
31. 0.000 0.000 ↓ 0.0

Unique (cost=297.58..310.05 rows=1,919 width=41) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Sort (cost=297.58..303.81 rows=2,493 width=41) (actual rows= loops=)

  • Sort Key: mappa_id_strutture.id_struttura_organigramma, mappa_id_strutture.attiva DESC, mappa_id_strutture.datafi DESC, mappa_id_strutture.data_inserimento_riga DESC
33. 0.000 0.000 ↓ 0.0

Seq Scan on mappa_id_strutture (cost=0.00..156.93 rows=2,493 width=41) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Scan using procton_strutture_pk on strutture ps (cost=0.28..1.10 rows=1 width=25) (actual rows= loops=)

  • Index Cond: ((id_struttura)::text = (mappa_id_strutture.id_struttura)::text)
  • Filter: (attiva <> 0)
35. 0.000 0.000 ↓ 0.0

Seq Scan on bb_predicati pre (cost=0.00..1.58 rows=58 width=16) (actual rows= loops=)