explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H8HI

Settings
# exclusive inclusive rows x rows loops node
1. 45.191 27,567.041 ↑ 1.0 1 1

Limit (cost=3,364,666.72..3,364,666.73 rows=1 width=7,956) (actual time=27,521.851..27,567.041 rows=1 loops=1)

2. 0.111 27,521.850 ↑ 1.0 1 1

Sort (cost=3,364,666.72..3,364,666.73 rows=1 width=7,956) (actual time=27,521.850..27,521.850 rows=1 loops=1)

  • Sort Key: persoon1_.achternaam
  • Sort Method: quicksort Memory: 26kB
3. 0.010 27,521.739 ↑ 1.0 1 1

Nested Loop Left Join (cost=637,035.27..3,364,666.71 rows=1 width=7,956) (actual time=27,504.660..27,521.739 rows=1 loops=1)

4. 0.008 27,506.193 ↑ 1.0 1 1

Nested Loop (cost=637,034.83..3,364,665.90 rows=1 width=6,774) (actual time=27,489.115..27,506.193 rows=1 loops=1)

5. 0.009 27,490.103 ↓ 2.0 2 1

Nested Loop Left Join (cost=637,034.40..3,364,665.39 rows=1 width=6,655) (actual time=27,473.030..27,490.103 rows=2 loops=1)

6. 0.000 27,464.878 ↓ 2.0 2 1

Nested Loop (cost=637,033.96..3,364,664.85 rows=1 width=6,627) (actual time=27,456.361..27,464.878 rows=2 loops=1)

7. 72.492 27,485.541 ↓ 2.0 2 1

Gather (cost=637,033.53..3,364,664.32 rows=1 width=5,455) (actual time=27,440.350..27,485.541 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 2,059.662 27,413.049 ↑ 1.0 1 3

Merge Left Join (cost=636,033.53..3,363,664.22 rows=1 width=5,455) (actual time=23,294.023..27,413.049 rows=1 loops=3)

  • Merge Cond: (persoon1_.tijdelijk_gba_adres = tijdelijkg3_.id)
  • Filter: ((((gbaadres2_.postcode)::text = ANY ('{2172DB,9999ZZ}'::text[])) OR ((tijdelijkg3_.postcode)::text = ANY ('{2172DB,9999ZZ}'::text[]))) AND (((gbaadres2_.huisletter IS NULL) AND (gbaadres2_.huisnummer_toevoeging IS NULL) AND ((gbaadres2_.postcode)::text = '2172DB'::text) AND (gbaadres2_.huisnummer = 2)) OR ((tijdelijkg3_.huisletter IS NULL) AND (tijdelijkg3_.huisnummer_toevoeging IS NULL) AND ((tijdelijkg3_.postcode)::text = '2172DB'::text) AND (tijdelijkg3_.huisnummer = 2)) OR ((gbaadres2_.huisletter IS NULL) AND (gbaadres2_.huisnummer_toevoeging IS NULL) AND ((gbaadres2_.postcode)::text = '9999ZZ'::text) AND (gbaadres2_.huisnummer = 55)) OR ((tijdelijkg3_.huisletter IS NULL) AND (tijdelijkg3_.huisnummer_toevoeging IS NULL) AND ((tijdelijkg3_.postcode)::text = '9999ZZ'::text) AND (tijdelijkg3_.huisnummer = 55))))
  • Rows Removed by Filter: 2999900
9. 11,627.725 15,417.530 ↑ 1.3 2,999,901 3

Nested Loop (cost=0.87..2,655,609.13 rows=3,762,922 width=4,130) (actual time=19.229..15,417.530 rows=2,999,901 loops=3)

10. 3,789.802 3,789.802 ↑ 1.3 2,999,901 3

Parallel Index Scan using idx_94231601163b34d9 on pat_persoon persoon1_ (cost=0.43..508,356.94 rows=3,762,922 width=2,711) (actual time=4.263..3,789.802 rows=2,999,901 loops=3)

  • Filter: ((overlijdensdatum IS NULL) AND (datum_vertrokken_uit_nederland IS NULL))
  • Rows Removed by Filter: 536213
11. 0.003 0.003 ↑ 1.0 1 8,999,703

Index Scan using org_adres_pkey on org_adres gbaadres2_ (cost=0.43..0.57 rows=1 width=1,419) (actual time=0.003..0.003 rows=1 loops=8,999,703)

  • Index Cond: (id = persoon1_.gba_adres)
12. 9,935.857 9,935.857 ↑ 1.1 10,358,395 3

Index Scan using org_adres_pkey on org_adres tijdelijkg3_ (cost=0.43..671,387.79 rows=10,898,731 width=1,325) (actual time=0.067..9,935.857 rows=10,358,395 loops=3)

13. 24.512 24.512 ↑ 1.0 1 2

Index Scan using pat_patient_pkey on pat_patient this_ (cost=0.43..0.53 rows=1 width=1,172) (actual time=12.256..12.256 rows=1 loops=2)

  • Index Cond: (id = persoon1_.patient)
  • Filter: (((dtype)::text = 'Client'::text) AND ((gba_status)::text = 'INDICATIE_AANWEZIG'::text))
14. 25.216 25.216 ↑ 1.0 1 2

Index Scan using gba_mutatie_pkey on gba_mutatie laatstegba6_ (cost=0.44..0.54 rows=1 width=28) (actual time=12.608..12.608 rows=1 loops=2)

  • Index Cond: (this_.laatste_gba_mutatie = id)
15. 16.082 16.082 ↓ 0.0 0 2

Index Scan using dossier_pkey on dossier mammadossi4_ (cost=0.43..0.51 rows=1 width=119) (actual time=8.040..8.041 rows=0 loops=2)

  • Index Cond: (id = this_.mamma_dossier)
16. 15.536 15.536 ↑ 1.0 1 1

Index Scan using screening_ronde_pkey on screening_ronde laatstescr5_ (cost=0.44..0.81 rows=1 width=1,182) (actual time=15.536..15.536 rows=1 loops=1)

  • Index Cond: (mammadossi4_.laatste_screening_ronde = id)