explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cNfn

Settings
# exclusive inclusive rows x rows loops node
1. 8.988 371.647 ↑ 1.0 25 1

Unique (cost=2,058.57..2,060.47 rows=25 width=2) (actual time=353.886..371.647 rows=25 loops=1)

2. 19.204 362.659 ↓ 6.5 2,465 1

Sort (cost=2,058.57..2,059.52 rows=381 width=2) (actual time=353.879..362.659 rows=2,465 loops=1)

  • Sort Key: x.""RegionId"
  • Sort Method: quicksort Memory: 212kB
3. 27.350 343.455 ↓ 6.5 2,465 1

Nested Loop (cost=1,123.21..2,042.23 rows=381 width=2) (actual time=193.233..343.455 rows=2,465 loops=1)

4. 19.735 296.385 ↓ 6.5 2,465 1

Hash Join (cost=1,122.79..1,397.11 rows=381 width=14) (actual time=193.199..296.385 rows=2,465 loops=1)

  • Hash Cond: (x.""Id"" = a0.""Address_Id"")
5. 46.338 196.938 ↓ 1.4 2,555 1

Hash Join (cost=685.86..949.32 rows=1,880 width=10) (actual time=113.474..196.938 rows=2,555 loops=1)

  • Hash Cond: (x.""Id"" = a.""Address_Id"")
6. 37.161 37.161 ↓ 1.0 9,728 1

Seq Scan on ""AddressH24"" x (cost=0.00..208.50 rows=9,642 width=6) (actual time=0.019..37.161 rows=9,728 loops=1)

  • Filter: (""RegionId"" IS NOT NULL)
  • Rows Removed by Filter: 3622
7. 10.129 113.439 ↓ 1.1 2,800 1

Hash (cost=653.32..653.32 rows=2,603 width=4) (actual time=113.436..113.439 rows=2,800 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 131kB
8. 21.007 103.310 ↓ 1.1 2,800 1

HashAggregate (cost=627.29..653.32 rows=2,603 width=4) (actual time=93.044..103.310 rows=2,800 loops=1)

  • Group Key: a.""Address_Id"
9. 21.279 82.303 ↓ 1.1 2,800 1

Hash Join (cost=563.06..620.78 rows=2,603 width=4) (actual time=29.966..82.303 rows=2,800 loops=1)

  • Hash Cond: (""a.Division"".""LegalEntityId"" = l.""Id"")
10. 21.107 50.248 ↑ 1.0 2,865 1

Hash Join (cost=320.85..371.03 rows=2,865 width=8) (actual time=19.164..50.248 rows=2,865 loops=1)

  • Hash Cond: (a.""Division_Id"" = ""a.Division"".""Id"")
11. 10.001 10.001 ↑ 1.0 2,865 1

Seq Scan on ""DivisionAddresses"" a (cost=0.00..42.65 rows=2,865 width=8) (actual time=0.009..10.001 rows=2,865 loops=1)

12. 9.367 19.140 ↑ 1.0 2,571 1

Hash (cost=288.71..288.71 rows=2,571 width=8) (actual time=19.137..19.140 rows=2,571 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 133kB
13. 9.773 9.773 ↑ 1.0 2,571 1

Seq Scan on ""Divisions"" ""a.Division"" (cost=0.00..288.71 rows=2,571 width=8) (actual time=0.007..9.773 rows=2,571 loops=1)

14. 5.164 10.776 ↑ 1.0 1,413 1

Hash (cost=224.55..224.55 rows=1,413 width=4) (actual time=10.773..10.776 rows=1,413 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 66kB
15. 5.612 5.612 ↑ 1.0 1,413 1

Seq Scan on ""LegalEntities"" l (cost=0.00..224.55 rows=1,413 width=4) (actual time=0.008..5.612 rows=1,413 loops=1)

  • Filter: ((NOT ""IsDeleted"") AND ""IsOnPortal"")
  • Rows Removed by Filter: 142
16. 10.170 79.712 ↓ 1.0 2,714 1

Hash (cost=403.09..403.09 rows=2,707 width=4) (actual time=79.709..79.712 rows=2,714 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 128kB
17. 20.365 69.542 ↓ 1.0 2,714 1

HashAggregate (cost=376.02..403.09 rows=2,707 width=4) (actual time=59.458..69.542 rows=2,714 loops=1)

  • Group Key: a0.""Address_Id"
18. 20.313 49.177 ↓ 1.0 2,714 1

Hash Join (cost=319.07..369.25 rows=2,707 width=4) (actual time=18.815..49.177 rows=2,714 loops=1)

  • Hash Cond: (a0.""Division_Id"" = ""a.Division0"".""Id"")
19. 10.078 10.078 ↑ 1.0 2,865 1

Seq Scan on ""DivisionAddresses"" a0 (cost=0.00..42.65 rows=2,865 width=8) (actual time=0.009..10.078 rows=2,865 loops=1)

20. 9.097 18.786 ↑ 1.0 2,420 1

Hash (cost=288.71..288.71 rows=2,429 width=4) (actual time=18.783..18.786 rows=2,420 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 118kB
21. 9.689 9.689 ↑ 1.0 2,420 1

Seq Scan on ""Divisions"" ""a.Division0"" (cost=0.00..288.71 rows=2,429 width=4) (actual time=0.008..9.689 rows=2,420 loops=1)

  • Filter: ""IsOnPortal"
  • Rows Removed by Filter: 151
22. 19.720 19.720 ↑ 1.0 1 2,465

Index Only Scan using ""PK_dbo.Addresses"" on ""Addresses"" ""x.Address"" (cost=0.42..1.69 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=2,465)

  • Index Cond: (""Id"" = x.""Id"")
  • Heap Fetches: 2465
Planning time : 1.340 ms
Execution time : 371.992 ms