explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bdhF : Optimization for: plan #bHBm

Settings

Optimization path:

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

Sort (cost=578,428,690.21..578,428,692.39 rows=872 width=1,848) (actual rows= loops=)

  • Sort Key: t.date_debut_theorique
2. 0.000 0.000 ↓ 0.0

Seq Scan on t_troncon_mission t (cost=0.00..578,428,647.62 rows=872 width=1,848) (actual rows= loops=)

  • Filter: (('2019-04-08 00:00:00'::timestamp without time zone <= date_debut_theorique) AND ('2019-04-19 00:00:00'::timestamp without time zone >= date_debut_theorique) AND (concat(id_gare_origine, '-', id_gare_destination) = ANY ('{8767300400000-8758182700000,8767300400000-8767700500000,8727133800000-8767700500000,8727133800000-8757124000000,8758182700000-8767300400000,8758182700000-8757124000000,8727131200000-8767700500000,8727131200000-8757124000000,8767700500000-8767300400000,8767700500000-8727133800000,8767700500000-8727131200000,8767700500000-8727138700000,8757124000000-8727133800000,8757124000000-8758182700000,8757124000000-8727131200000,8757124000000-8727138700000,8727138700000-8767700500000,8727138700000-8757124000000}'::text[])) AND ((SubPlan 2) > 0))
3.          

SubPlan (forSeq Scan)

4. 0.000 0.000 ↓ 0.0

Aggregate (cost=11.07..11.08 rows=1 width=93) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Scan using i_gca_gop_t_association_troncon_mission on t_association a (cost=0.42..11.06 rows=2 width=93) (actual rows= loops=)

  • Index Cond: (id_troncon_mission = t.id_troncon_mission)
6. 0.000 0.000 ↓ 0.0

Aggregate (cost=2,761.74..2,761.75 rows=1 width=307) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..2,591.42 rows=68,128 width=307) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on t_lot l (cost=0.00..1,735.36 rows=34,064 width=307) (actual rows= loops=)

  • Filter: (besoin_transport = ANY ('{13,19}'::integer[]))
9. 0.000 0.000 ↓ 0.0

Materialize (cost=0.42..4.46 rows=2 width=0) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Only Scan using i_gca_gop_t_association_troncon_mission on t_association a2 (cost=0.42..4.45 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (id_troncon_mission = t.id_troncon_mission)