explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7cqA

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

Limit (cost=2,616.53..2,616.73 rows=1 width=1,404) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=2,616.53..2,616.73 rows=1 width=1,404) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=2,616.53..2,616.54 rows=1 width=1,404) (actual rows= loops=)

  • Sort Key: t3.t_booking_testata_id, t3.id, t3.area_stoccaggio_default_id, t3.t_booking_dettaglio_prec_id, t3.create_b_utenti_id, t3.create_time, t3.data_mafizzazione, t3.merce_diametro, t3.direzione_viaggio, t3.dogana, t3.external_code, t3.flag_imdg, t3.flag_imbarcabile, t3.flag_reefer, t3.flag_stackable, t3.full_empty, t3.guidato, t3.in_mafi, t3.last_b_mezzi_mov_id, t3.lunghezza_uti, t3.magazzino_default_id, t3.mark_numbers, t3.merce_altezza, t3.merce_descrizione, t3.merce_larghezza, t3.merce_lunghezza, t3.merce_peso_lordo, t3.merce_peso_netto, t3.merce_quantity, t3.b_mezzi_mov_id, t3.abilita_mod_gate, t3.n_driver, t3.note, t3.packing_list, t3.pesa_vgm, t3.merce_peso_netto_rilevato, t3.posizione, t3.priorita, t3.progressivo, t3.progressivo_terminal, t3.purchase_order, t3.quantity, t3.ritirabile, t3.sigillo_1, t3.sigillo_2, t3.sigillo_3, t3.b_stati_booking_id, t3.tara_uti, t3.tipo_shifting, t3.tipo_viaggio, t3.t_pcs_bollette_dettaglio_id, t3.update_b_utenti_id, t3.update_time, t3.uti_id, t3.uti_richiesti, t3.uuid, t3.b_aree_id, t3.t_calendario_navi_id, t3.t_calendario_navi_transhipment_id, t3.b_carri_id, t3.b_clienti_modello_id, t3.b_codici_nhm_id, t3.b_commodity_id, t3.b_autotrasportatori_id, t3.b_merce_id, t3.t_merci_pericolose_id, t3.t_move_position_id, t3.b_origini_id, t3.pod_marine_ports_id, t3.pol_b_marine_ports_id, t3.porto_destinazione_id, t3.porto_origine_id, t3.spod_marine_ports_id, t3.b_tipi_mezzi_id, t3.b_tipi_uti_id, t3.t_tracce_treno_id, t3.t_mezzi_id
4. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=732.81..2,616.52 rows=1 width=1,404) (actual rows= loops=)

  • Join Filter: ((t7.t_booking_dettaglio = t3.id) OR (t7.preavv_t_booking_dettaglio_id = t3.id))
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..940.87 rows=1 width=1,404) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..940.59 rows=1 width=1,412) (actual rows= loops=)

  • Join Filter: (t0.b_tratte_id = t6.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on b_tratte t6 (cost=0.00..1.20 rows=1 width=4) (actual rows= loops=)

  • Filter: (b_luoghi_origine_id = 2)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..939.37 rows=2 width=1,416) (actual rows= loops=)

  • Join Filter: (t5.b_tratte_id = t4.id)
9. 0.000 0.000 ↓ 0.0

Seq Scan on b_tratte t4 (cost=0.00..1.20 rows=1 width=4) (actual rows= loops=)

  • Filter: (b_luoghi_origine_id = 2)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..937.78 rows=31 width=1,420) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..921.29 rows=31 width=1,416) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.27..414.55 rows=717 width=16) (actual rows= loops=)

  • Hash Cond: (t2.b_tratte_composte_id = t0.b_tratte_composte_id)
13. 0.000 0.000 ↓ 0.0

Seq Scan on t_booking_testata t2 (cost=0.00..349.62 rows=15,062 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=1.26..1.26 rows=1 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on b_tratte_composte_tratta t0 (cost=0.00..1.26 rows=1 width=8) (actual rows= loops=)

  • Filter: (posizione = 1)
16. 0.000 0.000 ↓ 0.0

Index Scan using idx_t_booking_dettaglio_t_booking_testata_id on t_booking_dettaglio t3 (cost=0.00..0.70 rows=1 width=1,400) (actual rows= loops=)

  • Index Cond: (t_booking_testata_id = t2.id)
  • Filter: ((b_stati_booking_id)::text = ANY ('{ACCETTATO,PIANIFICATO,RIPIANIFICATO}'::text[]))
17. 0.000 0.000 ↓ 0.0

Index Scan using pk_t_tracce_treno on t_tracce_treno t5 (cost=0.00..0.52 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = t3.t_tracce_treno_id)
18. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_b_tratte_composte on b_tratte_composte t1 (cost=0.00..0.27 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = t2.b_tratte_composte_id)
19. 0.000 0.000 ↓ 0.0

Hash Join (cost=731.54..1,568.52 rows=7,142 width=8) (actual rows= loops=)

  • Hash Cond: (t7.t_interchange_testata_id = t8.id)
20. 0.000 0.000 ↓ 0.0

Seq Scan on t_interchange_dettaglio t7 (cost=0.00..536.56 rows=20,356 width=12) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=644.39..644.39 rows=6,972 width=4) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on t_interchange_testata t8 (cost=0.00..644.39 rows=6,972 width=4) (actual rows= loops=)

  • Filter: ((tipo)::text <> 'IN'::text)