explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SPhk

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

Hash Join (cost=1,385,375.72..1,385,400.94 rows=1 width=551) (actual rows= loops=)

  • Hash Cond: (centre1_.ref_externe = pds0_.ref_centre)
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=22.99..46.54 rows=444 width=342) (actual rows= loops=)

  • Hash Cond: (centre1_.code_exploitation_usine = centre2_.ref_externe)
3. 0.000 0.000 ↓ 0.0

Seq Scan on centre centre1_ (cost=0.00..17.44 rows=444 width=171) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash (cost=17.44..17.44 rows=444 width=171) (actual rows= loops=)

  • Buckets: 1024 Batches: 1 Memory Usage: 98kB
5. 0.000 0.000 ↓ 0.0

Seq Scan on centre centre2_ (cost=0.00..17.44 rows=444 width=171) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=1,385,352.72..1,385,352.72 rows=1 width=209) (actual rows= loops=)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,385,339.51..1,385,352.72 rows=1 width=209) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on replica_synchro pdssynchro3_ (cost=0.00..4.37 rows=1 width=12) (actual rows= loops=)

  • Filter: ((type = ANY (ARRAY[($1)::text, ($2)::text])) AND (replica_type = 'PDS'::text))
9. 0.000 0.000 ↓ 0.0

Index Scan using uq_pdl_ref_externe on pds pds0_ (cost=1,385,339.51..1,385,348.34 rows=1 width=209) (actual rows= loops=)

  • Index Cond: (ref_externe = pdssynchro3_.ref_object)
  • Filter: ((actif <> $3) OR ((date_sortie IS NOT NULL) AND (date_sortie <= $4)) OR (NOT (hashed SubPlan 1)) OR (NOT (hashed SubPlan 2)))
10.          

SubPlan (for Index Scan)

11. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,125.30..2,125.43 rows=13 width=11) (actual rows= loops=)

  • Group Key: conditions4_.ref_pdl
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..2,125.17 rows=52 width=11) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using conditions_de_service_code_specialite_hbe_ind_tracabilite_3d_id on conditions_de_service conditions4_ (cost=0.43..1,872.71 rows=52 width=11) (actual rows= loops=)

  • Index Cond: ((code_specialite_hbe = ($5)::text) AND (ind_tracabilite_3d = $6))
  • Filter: (code_service = ANY (ARRAY[($7)::text, ($8)::text, ($9)::text]))
14. 0.000 0.000 ↓ 0.0

Index Only Scan using uq_pdl_ref_externe on pds pds5_ (cost=0.43..4.85 rows=1 width=11) (actual rows= loops=)

  • Index Cond: (ref_externe = conditions4_.ref_pdl)
15. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,381,499.81..1,382,870.86 rows=137,105 width=11) (actual rows= loops=)

  • Group Key: stock6_.ref_pdl
16. 0.000 0.000 ↓ 0.0

Seq Scan on stock stock6_ (cost=0.00..1,307,568.56 rows=29,572,500 width=11) (actual rows= loops=)

  • Filter: (((date_fin_validite IS NULL) OR (date_fin_validite > $10)) AND ((date_debut_validite IS NULL) OR (date_debut_validite < $11)))