explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BRM6

Settings
# exclusive inclusive rows x rows loops node
1. 9.393 370.385 ↑ 1.0 25 1

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

2. 17.891 360.992 ↓ 6.5 2,465 1

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

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

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

4. 20.439 298.813 ↓ 6.5 2,465 1

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

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

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

  • Hash Cond: (x.""Id"" = a.""Address_Id"")
6. 37.927 37.927 ↓ 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.927 rows=9,728 loops=1)

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

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

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

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

  • Group Key: a.""Address_Id"
9. 20.007 82.249 ↓ 1.1 2,800 1

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

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

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

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

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

12. 9.321 19.487 ↑ 1.0 2,571 1

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

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

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

14. 5.321 11.052 ↑ 1.0 1,413 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 66kB
15. 5.731 5.731 ↑ 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.731 rows=1,413 loops=1)

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

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

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

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

  • Group Key: a0.""Address_Id"
18. 20.428 49.515 ↓ 1.0 2,714 1

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

  • Hash Cond: (a0.""Division_Id"" = ""a.Division0"".""Id"")
19. 10.713 10.713 ↑ 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.713 rows=2,865 loops=1)

20. 8.961 18.374 ↑ 1.0 2,420 1

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

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

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

  • Filter: ""IsOnPortal"
  • Rows Removed by Filter: 151
22. 17.255 17.255 ↑ 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.007..0.007 rows=1 loops=2,465)

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