explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jooT

Settings
# exclusive inclusive rows x rows loops node
1. 17.906 53,330.578 ↑ 516,847.6 9,749 1

Sort (cost=4,644,493,779.16..4,657,090,647.75 rows=5,038,747,434 width=442) (actual time=53,329.200..53,330.578 rows=9,749 loops=1)

  • Sort Key: brk_stukdelen._gobid
  • Sort Method: external merge Disk: 5144kB
2. 163.232 53,312.672 ↑ 516,847.6 9,749 1

Hash Left Join (cost=571,205.93..856,724,925.26 rows=5,038,747,434 width=442) (actual time=42,935.211..53,312.672 rows=9,749 loops=1)

  • Hash Cond: (((rel_3.dst_id)::text = (zrt_0._id)::text) AND ((rel_3.dst_volgnummer)::text = (zrt_0.volgnummer)::text))
3. 71.518 29,121.503 ↑ 516,847.6 9,749 1

Merge Right Join (cost=254,875.92..77,176,351.34 rows=5,038,747,434 width=474) (actual time=18,900.064..29,121.503 rows=9,749 loops=1)

  • Merge Cond: ((rel_2.src_id)::text = (brk_stukdelen._id)::text)
4. 589.477 9,359.711 ↑ 1.0 662,959 1

Nested Loop Left Join (cost=0.85..480,530.33 rows=664,900 width=48) (actual time=1.145..9,359.711 rows=662,959 loops=1)

5. 814.726 814.726 ↑ 1.0 662,959 1

Index Scan using src_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..21,409.08 rows=664,900 width=46) (actual time=1.089..814.726 rows=662,959 loops=1)

6. 7,955.508 7,955.508 ↑ 1.0 1 662,959

Index Scan using brk_akt_b80bb7740288fda1f201890375a60c8f on brk_aantekeningenkadastraleobjecten akt_0 (cost=0.43..0.68 rows=1 width=82) (actual time=0.012..0.012 rows=1 loops=662,959)

  • Index Cond: ((_id)::text = (rel_2.dst_id)::text)
  • Filter: (((volgnummer)::text = (rel_2.dst_volgnummer)::text) AND ((_expiration_date IS NULL) OR (_expiration_date > now())))
  • Rows Removed by Filter: 1
7. 3.977 19,690.274 ↑ 5,561.0 9,749 1

Materialize (cost=254,875.06..1,248,483.49 rows=54,214,467 width=438) (actual time=18,733.207..19,690.274 rows=9,749 loops=1)

8. 100.090 19,686.297 ↑ 6,749.8 8,032 1

Merge Left Join (cost=254,875.06..1,112,947.32 rows=54,214,467 width=438) (actual time=18,733.202..19,686.297 rows=8,032 loops=1)

  • Merge Cond: ((brk_stukdelen._id)::text = (rel_3.src_id)::text)
9. 87.102 18,991.006 ↑ 662.3 1,682 1

Merge Left Join (cost=254,857.93..273,377.64 rows=1,113,998 width=400) (actual time=18,617.059..18,991.006 rows=1,682 loops=1)

  • Merge Cond: ((brk_stukdelen._id)::text = (rel_1.src_id)::text)
10. 3.585 1,281.390 ↑ 68.3 1,000 1

Sort (cost=79,870.95..80,041.77 rows=68,326 width=359) (actual time=1,280.699..1,281.390 rows=1,000 loops=1)

  • Sort Key: brk_stukdelen._id
  • Sort Method: quicksort Memory: 540kB
11. 2.258 1,277.805 ↑ 68.3 1,000 1

Nested Loop Left Join (cost=1.28..67,818.18 rows=68,326 width=359) (actual time=4.821..1,277.805 rows=1,000 loops=1)

12. 0.403 437.547 ↑ 1.0 1,000 1

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

13. 437.144 437.144 ↑ 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=2.767..437.144 rows=1,000 loops=1)

  • Filter: ((_expiration_date IS NULL) OR (_expiration_date > now()))
14. 1.000 838.000 ↓ 0.0 0 1,000

Nested Loop Left Join (cost=0.86..67.00 rows=68 width=49) (actual time=0.838..0.838 rows=0 loops=1,000)

15. 837.000 837.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.837..0.837 rows=0 loops=1,000)

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

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

  • Index Cond: ((_id)::text = (rel_0.dst_id)::text)
  • Filter: ((_expiration_date IS NULL) OR (_expiration_date > now()))
17. 64.347 17,622.514 ↑ 1.0 586,015 1

Materialize (cost=174,986.98..177,923.19 rows=587,243 width=47) (actual time=17,335.143..17,622.514 rows=586,015 loops=1)

18. 1,000.012 17,558.167 ↑ 1.0 586,015 1

Sort (cost=174,986.98..176,455.09 rows=587,243 width=47) (actual time=17,335.138..17,558.167 rows=586,015 loops=1)

  • Sort Key: rel_1.src_id
  • Sort Method: external merge Disk: 34208kB
19. 1,071.445 16,558.155 ↑ 1.0 587,243 1

Merge Right Join (cost=0.85..108,136.43 rows=587,243 width=47) (actual time=2.995..16,558.155 rows=587,243 loops=1)

  • Merge Cond: ((art_0._id)::text = (rel_1.dst_id)::text)
20. 10,854.311 10,854.311 ↓ 1.0 563,450 1

Index Scan using brk_art_b80bb7740288fda1f201890375a60c8f on brk_aantekeningenrechten art_0 (cost=0.42..77,494.59 rows=544,902 width=78) (actual time=1.990..10,854.311 rows=563,450 loops=1)

  • Filter: ((_expiration_date IS NULL) OR (_expiration_date > now()))
  • Rows Removed by Filter: 4423
21. 4,632.399 4,632.399 ↑ 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.998..4,632.399 rows=587,243 loops=1)

22. 89.615 595.201 ↑ 1.0 696,456 1

Materialize (cost=0.42..25,340.76 rows=704,984 width=45) (actual time=1.491..595.201 rows=696,456 loops=1)

23. 505.586 505.586 ↑ 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=1.488..505.586 rows=690,917 loops=1)

24. 429.880 24,027.937 ↑ 1.0 788,683 1

Hash (cost=295,181.38..295,181.38 rows=791,509 width=68) (actual time=24,027.937..24,027.937 rows=788,683 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 4677kB
25. 23,598.057 23,598.057 ↑ 1.0 788,683 1

Seq Scan on brk_zakelijkerechten zrt_0 (cost=0.00..295,181.38 rows=791,509 width=68) (actual time=2.834..23,598.057 rows=788,683 loops=1)

  • Filter: ((_expiration_date IS NULL) OR (_expiration_date > now()))
  • Rows Removed by Filter: 1424898
Planning time : 120.940 ms
Execution time : 53,336.277 ms