explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gFED : Optimization for: Optimization for: Optimization for: Optimization for: plan #DOdM; plan #KAL0; plan #BvFq; plan #3pUm

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 14,835.218 ↑ 1.0 1 1

Unique (cost=119,615.18..119,615.20 rows=1 width=69) (actual time=14,835.214..14,835.218 rows=1 loops=1)

2. 0.026 14,835.214 ↓ 3.0 3 1

Sort (cost=119,615.18..119,615.19 rows=1 width=69) (actual time=14,835.213..14,835.214 rows=3 loops=1)

  • Sort Key: i0."Tag", i0."RefId", n0."RefId", s."StatusId", d."Name
  • Sort Method: quicksort Memory: 25kB
3. 0.012 14,835.188 ↓ 3.0 3 1

Nested Loop (cost=1,009.99..119,615.17 rows=1 width=69) (actual time=14,835.023..14,835.188 rows=3 loops=1)

  • Join Filter: (s."TenantId" = d."TenantId")
4. 0.031 14,835.080 ↑ 1.0 3 1

Nested Loop (cost=1,009.71..119,614.26 rows=3 width=75) (actual time=14,834.938..14,835.080 rows=3 loops=1)

  • Join Filter: ((s."TenantId" = l0."TenantId") AND (l."LanguageId" = l0."Id"))
  • Rows Removed by Join Filter: 69
5. 0.034 0.034 ↑ 1.0 3 1

Index Scan using "Language_IX_TenantId" on "Language" l0 (cost=0.14..12.56 rows=3 width=16) (actual time=0.022..0.034 rows=3 loops=1)

  • Filter: ("LocalId" = 1,031)
  • Rows Removed by Filter: 21
6. 0.034 14,835.015 ↑ 2.5 24 3

Materialize (cost=1,009.58..119,598.65 rows=61 width=75) (actual time=4,944.968..4,945.005 rows=24 loops=3)

7. 0.110 14,834.981 ↑ 2.5 24 1

Merge Join (cost=1,009.58..119,598.34 rows=61 width=75) (actual time=14,834.898..14,834.981 rows=24 loops=1)

  • Merge Cond: (i1."Id" = i0."StatusId")
8. 1.353 14,834.441 ↑ 4.4 337 1

Nested Loop (cost=1,001.66..130,922.10 rows=1,467 width=48) (actual time=5.082..14,834.441 rows=337 loops=1)

  • Join Filter: ((s."StatusName")::text = (i1."Name")::text)
  • Rows Removed by Join Filter: 2,032
9. 0.053 0.053 ↑ 1.6 15 1

Index Only Scan using "InstrumentStatu_View_IDX" on "InstrumentationStatus" i1 (cost=0.14..12.50 rows=24 width=17) (actual time=0.015..0.053 rows=15 loops=1)

  • Heap Fetches: 15
10. 0.000 14,833.035 ↑ 2.7 158 15

Materialize (cost=1,001.52..130,756.59 rows=428 width=52) (actual time=0.331..988.869 rows=158 loops=15)

11. 652.343 14,920.705 ↑ 2.5 168 1

Gather (cost=1,001.52..130,754.45 rows=428 width=52) (actual time=4.957..14,920.705 rows=168 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 1,213.618 14,268.362 ↑ 3.2 56 3 / 3

Hash Join (cost=1.52..129,711.65 rows=178 width=52) (actual time=9,331.981..14,268.362 rows=56 loops=3)

  • Hash Cond: ((l."CommonId" = s."LanguageDescriptionId") AND (l."TenantId" = s."TenantId"))
13. 13,052.396 13,052.396 ↑ 1.3 2,767,101 3 / 3

Parallel Seq Scan on "LanguageDescription" l (cost=0.00..103,766.77 rows=3,458,877 width=32) (actual time=9.655..13,052.396 rows=2,767,101 loops=3)

14. 0.040 2.348 ↑ 1.0 21 3 / 3

Hash (cost=1.21..1.21 rows=21 width=36) (actual time=2.348..2.348 rows=21 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
15. 2.308 2.308 ↑ 1.0 21 3 / 3

Seq Scan on "Statuses" s (cost=0.00..1.21 rows=21 width=36) (actual time=2.233..2.308 rows=21 loops=3)

16. 0.010 0.430 ↑ 1.0 1 1

Materialize (cost=7.91..7.92 rows=1 width=43) (actual time=0.426..0.430 rows=1 loops=1)

17. 0.014 0.420 ↑ 1.0 1 1

Sort (cost=7.91..7.92 rows=1 width=43) (actual time=0.418..0.420 rows=1 loops=1)

  • Sort Key: i0."StatusId
  • Sort Method: quicksort Memory: 25kB
18. 0.004 0.406 ↑ 1.0 1 1

Nested Loop (cost=5.08..7.90 rows=1 width=43) (actual time=0.348..0.406 rows=1 loops=1)

  • Join Filter: (n."Id" = n1."NodeId")
19. 0.011 0.379 ↑ 1.0 1 1

Nested Loop (cost=4.94..7.00 rows=1 width=59) (actual time=0.322..0.379 rows=1 loops=1)

20. 0.042 0.308 ↓ 6.0 6 1

Hash Join (cost=4.80..6.11 rows=1 width=40) (actual time=0.290..0.308 rows=6 loops=1)

  • Hash Cond: (i."NodeId" = n."Id")
21. 0.033 0.033 ↑ 1.0 22 1

Seq Scan on "InstrumentationNode" i (cost=0.00..1.22 rows=22 width=16) (actual time=0.025..0.033 rows=22 loops=1)

22. 0.011 0.233 ↓ 3.0 6 1

Hash (cost=4.78..4.78 rows=2 width=24) (actual time=0.233..0.233 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
23. 0.040 0.222 ↓ 3.0 6 1

Hash Join (cost=1.36..4.78 rows=2 width=24) (actual time=0.134..0.222 rows=6 loops=1)

  • Hash Cond: (n."NodeTypeId" = n0."Id")
24. 0.127 0.127 ↓ 1.7 24 1

Seq Scan on "Node" n (cost=0.00..3.37 rows=14 width=24) (actual time=0.053..0.127 rows=24 loops=1)

  • Filter: (("TenantId" = 2) AND ("ProjectId" = 2))
  • Rows Removed by Filter: 67
25. 0.009 0.055 ↑ 1.0 3 1

Hash (cost=1.32..1.32 rows=3 width=16) (actual time=0.054..0.055 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
26. 0.046 0.046 ↑ 1.0 3 1

Seq Scan on "NodeType" n0 (cost=0.00..1.32 rows=3 width=16) (actual time=0.028..0.046 rows=3 loops=1)

  • Filter: ("IsArea" = 1)
  • Rows Removed by Filter: 23
27. 0.060 0.060 ↓ 0.0 0 6

Index Scan using "Instrumentation_View_IDX" on "Instrumentation" i0 (cost=0.14..0.70 rows=1 width=35) (actual time=0.010..0.010 rows=0 loops=6)

  • Index Cond: ("Id" = i."InstrumentationId")
  • Filter: ("ParentId" = 0)
  • Rows Removed by Filter: 1
28. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using "NodeSpecification_IX_NodeId" on "NodeSpecification" n1 (cost=0.14..0.89 rows=1 width=8) (actual time=0.022..0.023 rows=1 loops=1)

  • Index Cond: ("NodeId" = i."NodeId")
  • Heap Fetches: 1
29. 0.096 0.096 ↑ 1.0 1 3

Index Scan using "PK_public.Description" on "Description" d (cost=0.27..0.29 rows=1 width=38) (actual time=0.032..0.032 rows=1 loops=3)

  • Index Cond: ("Id" = l."DescriptionId")
  • Filter: (l."TenantId" = "TenantId")