explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EwU6

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 27,388.991 ↑ 3.4 5,642 1

Finalize GroupAggregate (cost=67,766.36..71,116.24 rows=18,921 width=73) (actual time=25,605.381..27,388.991 rows=5,642 loops=1)

  • Group Key: c."NamedRange
2. 2,991.885 27,427.319 ↑ 1.6 14,479 1

Gather Merge (cost=67,766.36..70,704.06 rows=23,422 width=73) (actual time=25,605.358..27,427.319 rows=14,479 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 570.008 24,435.434 ↑ 2.4 4,826 3 / 3

Partial GroupAggregate (cost=66,766.34..67,000.56 rows=11,711 width=73) (actual time=22,899.672..24,435.434 rows=4,826 loops=3)

  • Group Key: c."NamedRange
4. 13,558.778 23,865.426 ↓ 277.5 3,250,010 3 / 3

Sort (cost=66,766.34..66,795.62 rows=11,711 width=45) (actual time=22,899.641..23,865.426 rows=3,250,010 loops=3)

  • Sort Key: c."NamedRange
  • Sort Method: external merge Disk: 175360kB
  • Worker 0: Sort Method: external merge Disk: 208504kB
  • Worker 1: Sort Method: external merge Disk: 145872kB
5. 586.738 10,306.648 ↓ 277.5 3,250,010 3 / 3

Hash Join (cost=5,726.97..65,974.93 rows=11,711 width=45) (actual time=3,243.709..10,306.648 rows=3,250,010 loops=3)

  • Hash Cond: (b."YearlyBalanceLookupId" = bt."BalanceTypeId")
6. 781.190 9,719.834 ↓ 277.5 3,250,010 3 / 3

Hash Join (cost=5,725.84..65,931.47 rows=11,711 width=61) (actual time=3,243.534..9,719.834 rows=3,250,010 loops=3)

  • Hash Cond: (m."Id" = c."MappingId")
7. 0.000 8,913.752 ↓ 323.7 1,421,638 3 / 3

Nested Loop (cost=4,082.70..64,083.37 rows=4,392 width=36) (actual time=3,218.549..8,913.752 rows=1,421,638 loops=3)

8. 2,996.158 6,215.580 ↓ 320.1 1,421,638 3 / 3

Hash Join (cost=4,082.28..56,616.70 rows=4,441 width=48) (actual time=3,218.388..6,215.580 rows=1,421,638 loops=3)

  • Hash Cond: (fti."ItemId" = mi."ItemMscoaId")
9. 21.908 23.876 ↑ 1.3 13,841 3 / 3

Parallel Bitmap Heap Scan on "FlattenedTransactions" fti (cost=1,163.68..53,566.79 rows=17,380 width=32) (actual time=2.258..23.876 rows=13,841 loops=3)

  • Recheck Cond: ("EntityId" = 'b787799f-4826-4f8a-9593-686999e54c9f'::uuid)
  • Heap Blocks: exact=1666
10. 1.968 1.968 ↑ 1.0 41,522 1 / 3

Bitmap Index Scan on "IX_FlattenedTransactions_EntityId" (cost=0.00..1,153.25 rows=41,711 width=0) (actual time=5.903..5.903 rows=41,522 loops=1)

  • Index Cond: ("EntityId" = 'b787799f-4826-4f8a-9593-686999e54c9f'::uuid)
11. 1,814.973 3,195.546 ↓ 656.2 5,964,789 3 / 3

Hash (cost=2,804.97..2,804.97 rows=9,090 width=48) (actual time=3,195.546..3,195.546 rows=5,964,789 loops=3)

  • Buckets: 65536 (originally 16384) Batches: 256 (originally 1) Memory Usage: 4043kB
12. 458.852 1,380.573 ↓ 656.2 5,964,789 3 / 3

Nested Loop (cost=20.32..2,804.97 rows=9,090 width=48) (actual time=0.302..1,380.573 rows=5,964,789 loops=3)

13. 3.676 6.099 ↓ 455.5 6,833 3 / 3

Hash Join (cost=19.76..346.18 rows=15 width=16) (actual time=0.168..6.099 rows=6,833 loops=3)

  • Hash Cond: (m."WorkbookId" = wb."Id")
14. 2.365 2.365 ↑ 1.0 9,842 3 / 3

Seq Scan on "Mapping" m (cost=0.00..300.42 rows=9,842 width=32) (actual time=0.101..2.365 rows=9,842 loops=3)

15. 0.006 0.058 ↑ 1.0 1 3 / 3

Hash (cost=19.75..19.75 rows=1 width=16) (actual time=0.058..0.058 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.052 0.052 ↑ 1.0 1 3 / 3

Seq Scan on "Workbook" wb (cost=0.00..19.75 rows=1 width=16) (actual time=0.052..0.052 rows=1 loops=3)

  • Filter: (("EntityId" = 'b787799f-4826-4f8a-9593-686999e54c9f'::uuid) AND ("Name" = 'AFS 2019.xlsx'::text))
  • Rows Removed by Filter: 2
17. 915.622 915.622 ↑ 6.0 873 20,499 / 3

Index Only Scan using "PK_MappingItem" on "MappingItem" mi (cost=0.56..111.55 rows=5,237 width=32) (actual time=0.006..0.134 rows=873 loops=20,499)

  • Index Cond: ("MappingId" = m."Id")
  • Heap Fetches: 816
18. 2,843.277 2,843.277 ↑ 1.0 1 4,264,915 / 3

Index Scan using "PK_FlattenedBalances" on "FlattenedBalances" fb (cost=0.42..1.68 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=4,264,915)

  • Index Cond: ("TransactionId" = fti."TransactionId")
19. 4.354 24.892 ↑ 1.0 26,245 3 / 3

Hash (cost=1,315.08..1,315.08 rows=26,245 width=73) (actual time=24.892..24.892 rows=26,245 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 2756kB
20. 8.697 20.538 ↑ 1.0 26,245 3 / 3

Hash Join (cost=679.72..1,315.08 rows=26,245 width=73) (actual time=8.755..20.538 rows=26,245 loops=3)

  • Hash Cond: (b."CellId" = c."Id")
21. 3.229 3.229 ↑ 1.0 26,245 3 / 3

Seq Scan on "Balance" b (cost=0.00..566.45 rows=26,245 width=32) (actual time=0.048..3.229 rows=26,245 loops=3)

22. 3.804 8.612 ↑ 1.0 18,921 3 / 3

Hash (cost=443.21..443.21 rows=18,921 width=73) (actual time=8.612..8.612 rows=18,921 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 2197kB
23. 4.808 4.808 ↑ 1.0 18,921 3 / 3

Seq Scan on "Cell" c (cost=0.00..443.21 rows=18,921 width=73) (actual time=0.048..4.808 rows=18,921 loops=3)

24. 0.013 0.076 ↑ 1.0 6 3 / 3

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.076..0.076 rows=6 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.063 0.063 ↑ 1.0 6 3 / 3

Seq Scan on "LookupBalanceTypes" bt (cost=0.00..1.06 rows=6 width=16) (actual time=0.062..0.063 rows=6 loops=3)