explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7FdS

Settings
# exclusive inclusive rows x rows loops node
1. 8.620 16,395.749 ↓ 1.3 46,054 1

Subquery Scan on sommengg (cost=33,853.08..35,588.97 rows=36,545 width=251) (actual time=16,298.293..16,395.749 rows=46,054 loops=1)

2. 75.218 16,387.129 ↓ 1.3 46,054 1

Unique (cost=33,853.08..35,223.52 rows=36,545 width=251) (actual time=16,298.291..16,387.129 rows=46,054 loops=1)

3. 127.320 16,311.911 ↓ 1.3 46,054 1

Sort (cost=33,853.08..33,944.45 rows=36,545 width=251) (actual time=16,298.289..16,311.911 rows=46,054 loops=1)

  • Sort Key: sm001000_pi7_sommaire_engagementbase.sm001000_pi7_sommaire_engagementid, sm001000_pi7_sommaire_engagementbase.sm001000_pi7_plan_engagementid, (CASE sm001000_pi7_sommaire_engagementbase.sm001000_pi_c_typ_cont WHEN 10 THEN 'Provincial'::text WHEN 20 THEN 'Fédéral'::text ELSE NULL::text END), sm001000_pi7_sommaire_engagementbase.sm001000_pi_v_intr_finn, (CASE sm001000_pi7_sommaire_engagementbase.sm001000_pi_c_mod_finn_prov WHEN 10 THEN 'Comptant'::text WHEN 20 THEN 'Financé'::text ELSE NULL::text END), sm001000_pi7_sommaire_engagementbase.sm001000_pi_q_nomb_aa_amor, sm001000_pi7_sommaire_engagementbase.sm001000_pi_c_typ_cont, sm001000_pi7_sommaire_engagementbase.sm001000_pi_c_typ_somm_engg, sm001000_pi7_sommaire_engagementbase.sm001000_pi_i_comp_payr_estm, sm001000_pi7_sommaire_engagementbase.sm001000_pi6_financement_autoriseid, sm001000_pi7_sommaire_engagementbase.sm001000_pi_d_aa_exer_finn, sm001000_pi7_sommaire_engagementbase.sm001000_pi_d_bas, sm001000_pi9_entite_budgetairebase.sm001000_pi_nm_entt_budg, sm001000_pi9_entite_budgetairebase.sm001000_pi_c_entt_budg
  • Sort Method: external merge Disk: 5736kB
4. 5.593 16,184.591 ↓ 1.3 46,054 1

Append (cost=1,367.50..26,708.45 rows=36,545 width=251) (actual time=154.329..16,184.591 rows=46,054 loops=1)

5. 46.776 16,178.994 ↓ 1.3 46,054 1

Hash Join (cost=1,367.50..26,343.01 rows=36,544 width=235) (actual time=154.328..16,178.994 rows=46,054 loops=1)

  • Hash Cond: (sm001000_pi7_sommaire_engagementbase.sm001000_pi9_entite_budgetaireid = sm001000_pi9_entite_budgetairebase.sm001000_pi9_entite_budgetaireid)
6. 15,982.480 16,131.024 ↓ 1.3 46,054 1

Bitmap Heap Scan on sm001000_pi7_sommaire_engagementbase (cost=1,366.46..25,692.62 rows=36,544 width=271) (actual time=153.122..16,131.024 rows=46,054 loops=1)

  • Recheck Cond: (sm001000_pi2_projet_infrastructureid IS NOT NULL)
  • Filter: (sm001000_pi_c_typ_cont = 10)
  • Rows Removed by Filter: 22954
  • Heap Blocks: exact=22529
7. 148.544 148.544 ↑ 1.0 69,010 1

Bitmap Index Scan on ndx_pi7_sommaire_engagementbase_pi2_projet_infrastructureid (cost=0.00..1,357.32 rows=69,453 width=0) (actual time=148.543..148.544 rows=69,010 loops=1)

  • Index Cond: (sm001000_pi2_projet_infrastructureid IS NOT NULL)
8. 0.004 1.194 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=128) (actual time=1.194..1.194 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 1.190 1.190 ↑ 1.0 2 1

Seq Scan on sm001000_pi9_entite_budgetairebase (cost=0.00..1.02 rows=2 width=128) (actual time=1.189..1.190 rows=2 loops=1)

10. 0.004 0.004 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=235) (actual time=0.004..0.004 rows=0 loops=1)

  • One-Time Filter: false
Planning time : 87.731 ms