explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MGIY

Settings
# exclusive inclusive rows x rows loops node
1. 14.577 10,817.207 ↑ 26,703.9 9,732 1

Sort (cost=272,456,304.85..273,106,010.15 rows=259,882,118 width=442) (actual time=10,816.005..10,817.207 rows=9,732 loops=1)

  • Sort Key: brk_stukdelen._gobid
  • Sort Method: external merge Disk: 5144kB
2. 1,803.512 10,802.630 ↑ 26,703.9 9,732 1

Hash Left Join (cost=855,008.87..113,349,362.63 rows=259,882,118 width=442) (actual time=9,554.920..10,802.630 rows=9,732 loops=1)

  • Hash Cond: (((rel_3.dst_id)::text = (zrt_0._id)::text) AND ((rel_3.dst_volgnummer)::text = (zrt_0.volgnummer)::text))
  • Filter: ((zrt_0._expiration_date IS NULL) OR (zrt_0._expiration_date > now()))
  • Rows Removed by Filter: 11
3. 76.665 6,821.586 ↑ 65,069.1 9,743 1

Merge Right Join (cost=509,570.25..10,368,536.27 rows=633,968,372 width=474) (actual time=5,884.994..6,821.586 rows=9,743 loops=1)

  • Merge Cond: ((rel_3.src_id)::text = (brk_stukdelen._id)::text)
4. 200.371 200.371 ↑ 1.0 690,917 1

Index Scan using src_id_mv_brk_sdl_brk_zrt_is_bron_voor_zakelijk_recht on mv_brk_sdl_brk_zrt_is_bron_voor_zakelijk_recht rel_3 (cost=0.42..23,578.30 rows=704,984 width=45) (actual time=0.019..200.371 rows=690,917 loops=1)

5. 1.745 6,544.550 ↑ 1,337.0 9,743 1

Materialize (cost=509,567.16..866,246.79 rows=13,026,772 width=442) (actual time=5,878.862..6,544.550 rows=9,743 loops=1)

6. 83.797 6,542.805 ↑ 3,839.3 3,393 1

Merge Left Join (cost=509,567.16..833,679.86 rows=13,026,772 width=442) (actual time=5,878.859..6,542.805 rows=3,393 loops=1)

  • Merge Cond: ((brk_stukdelen._id)::text = (rel_1.src_id)::text)
  • Filter: ((art_0._expiration_date IS NULL) OR (art_0._expiration_date > now()))
  • Rows Removed by Filter: 6
7. 83.430 3,461.953 ↑ 306.8 2,714 1

Merge Left Join (cost=335,950.18..385,011.24 rows=832,616 width=401) (actual time=3,156.104..3,461.953 rows=2,714 loops=1)

  • Merge Cond: ((brk_stukdelen._id)::text = (rel_2.src_id)::text)
  • Filter: ((akt_0._expiration_date IS NULL) OR (akt_0._expiration_date > now()))
8. 1.930 12.884 ↑ 25.4 1,000 1

Sort (cost=72,124.65..72,188.23 rows=25,431 width=359) (actual time=12.570..12.884 rows=1,000 loops=1)

  • Sort Key: brk_stukdelen._id
  • Sort Method: quicksort Memory: 540kB
9. 0.350 10.954 ↑ 25.4 1,000 1

Nested Loop Left Join (cost=1.28..67,818.18 rows=25,431 width=359) (actual time=0.047..10.954 rows=1,000 loops=1)

  • Filter: ((tng_0._expiration_date IS NULL) OR (tng_0._expiration_date > now()))
10. 0.110 2.604 ↑ 1.0 1,000 1

Limit (cost=0.42..128.41 rows=1,000 width=904) (actual time=0.022..2.604 rows=1,000 loops=1)

11. 2.494 2.494 ↑ 891.6 1,000 1

Index Scan using brk_sdl_d05569f886377400312d8c2edd4c6f4c on brk_stukdelen (cost=0.42..114,107.34 rows=891,586 width=904) (actual time=0.021..2.494 rows=1,000 loops=1)

  • Filter: ((_expiration_date IS NULL) OR (_expiration_date > now()))
12. 0.000 8.000 ↓ 0.0 0 1,000

Nested Loop Left Join (cost=0.86..66.66 rows=68 width=57) (actual time=0.008..0.008 rows=0 loops=1,000)

13. 8.000 8.000 ↓ 0.0 0 1,000

Index Scan using src_id_mv_brk_sdl_brk_tng_is_bron_voor_tenaamstelling on mv_brk_sdl_brk_tng_is_bron_voor_tenaamstelling rel_0 (cost=0.43..20.96 rows=68 width=13) (actual time=0.008..0.008 rows=0 loops=1,000)

  • Index Cond: ((brk_stukdelen._id)::text = (src_id)::text)
14. 0.000 0.000 ↓ 0.0 0

Index Scan using brk_tng_2a4dbedb477015cfe2b9f2c990906f44 on brk_tenaamstellingen tng_0 (cost=0.43..0.66 rows=1 width=58) (never executed)

  • Index Cond: ((_id)::text = (rel_0.dst_id)::text)
15. 65.919 3,365.639 ↑ 1.0 662,959 1

Materialize (cost=263,825.53..267,150.03 rows=664,900 width=56) (actual time=3,141.245..3,365.639 rows=662,959 loops=1)

16. 712.019 3,299.720 ↑ 1.0 662,959 1

Sort (cost=263,825.53..265,487.78 rows=664,900 width=56) (actual time=3,141.240..3,299.720 rows=662,959 loops=1)

  • Sort Key: rel_2.src_id
  • Sort Method: external merge Disk: 30560kB
17. 1,246.919 2,587.701 ↑ 1.0 664,900 1

Merge Left Join (cost=10.85..186,207.76 rows=664,900 width=56) (actual time=0.037..2,587.701 rows=664,900 loops=1)

  • Merge Cond: ((rel_2.dst_id)::text = (akt_0._id)::text)
  • Join Filter: ((akt_0.volgnummer)::text = (rel_2.dst_volgnummer)::text)
  • Rows Removed by Join Filter: 690034
18. 357.640 357.640 ↑ 1.0 664,900 1

Index Scan using dst_id_mv_brk_sdl_brk_akt_is_bron_voor_aantekening_kadastraal_o on mv_brk_sdl_brk_akt_is_bron_voor_aantekening_kadastraal_object rel_2 (cost=0.42..23,596.31 rows=664,900 width=46) (actual time=0.014..357.640 rows=664,900 loops=1)

19. 341.435 983.142 ↓ 1.2 1,405,585 1

Materialize (cost=0.43..139,412.60 rows=1,203,511 width=90) (actual time=0.013..983.142 rows=1,405,585 loops=1)

20. 641.707 641.707 ↑ 1.0 1,203,355 1

Index Scan using brk_akt_b80bb7740288fda1f201890375a60c8f on brk_aantekeningenkadastraleobjecten akt_0 (cost=0.43..136,403.82 rows=1,203,511 width=90) (actual time=0.011..641.707 rows=1,203,355 loops=1)

21. 59.548 2,997.055 ↑ 1.0 586,019 1

Materialize (cost=173,616.99..176,553.20 rows=587,243 width=55) (actual time=2,721.521..2,997.055 rows=586,019 loops=1)

22. 924.742 2,937.507 ↑ 1.0 586,015 1

Sort (cost=173,616.99..175,085.09 rows=587,243 width=55) (actual time=2,721.517..2,937.507 rows=586,015 loops=1)

  • Sort Key: rel_1.src_id
  • Sort Method: external merge Disk: 34672kB
23. 947.571 2,012.765 ↑ 1.0 587,243 1

Merge Right Join (cost=0.85..105,591.79 rows=587,243 width=55) (actual time=0.031..2,012.765 rows=587,243 loops=1)

  • Merge Cond: ((art_0._id)::text = (rel_1.dst_id)::text)
24. 665.929 665.929 ↓ 1.0 567,873 1

Index Scan using brk_art_b80bb7740288fda1f201890375a60c8f on brk_aantekeningenrechten art_0 (cost=0.42..74,655.39 rows=567,839 width=86) (actual time=0.019..665.929 rows=567,873 loops=1)

25. 399.265 399.265 ↑ 1.0 587,243 1

Index Scan using dst_id_mv_brk_sdl_brk_art_is_bron_voor_aantekening_recht on mv_brk_sdl_brk_art_is_bron_voor_aantekening_recht rel_1 (cost=0.42..22,176.26 rows=587,243 width=43) (actual time=0.009..399.265 rows=587,243 loops=1)

26. 791.596 2,177.532 ↑ 1.0 2,213,581 1

Hash (cost=284,109.25..284,109.25 rows=2,214,425 width=76) (actual time=2,177.532..2,177.532 rows=2,213,581 loops=1)

  • Buckets: 65536 Batches: 64 Memory Usage: 3699kB
27. 1,385.936 1,385.936 ↑ 1.0 2,213,581 1

Seq Scan on brk_zakelijkerechten zrt_0 (cost=0.00..284,109.25 rows=2,214,425 width=76) (actual time=0.047..1,385.936 rows=2,213,581 loops=1)

Planning time : 5.044 ms
Execution time : 10,829.761 ms