explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BHki

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

Hash Join (cost=1,412,903.34..1,412,928.56 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: 1,024 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,412,880.34..1,412,880.34 rows=1 width=209) (actual rows= loops=)

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

Nested Loop (cost=1,412,867.13..1,412,880.34 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,412,867.13..1,412,875.96 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=941.45..941.51 rows=6 width=11) (actual rows= loops=)

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

Nested Loop (cost=0.86..941.39 rows=24 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..820.47 rows=24 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..5.03 rows=1 width=11) (actual rows= loops=)

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

HashAggregate (cost=1,410,211.37..1,411,582.42 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,334,743.61 rows=30,187,102 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)))