explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.005 2.752 ↑ 1.0 1 1

Unique (cost=43.12..43.14 rows=1 width=69) (actual time=2.748..2.752 rows=1 loops=1)

2. 0.032 2.747 ↓ 3.0 3 1

Sort (cost=43.12..43.13 rows=1 width=69) (actual time=2.746..2.747 rows=3 loops=1)

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

Nested Loop (cost=11.44..43.11 rows=1 width=69) (actual time=1.333..2.715 rows=3 loops=1)

  • Join Filter: (s."TenantId" = d."TenantId")
4. 0.040 1.808 ↑ 1.0 3 1

Hash Join (cost=11.17..42.20 rows=3 width=75) (actual time=0.493..1.808 rows=3 loops=1)

  • Hash Cond: ((s."TenantId" = l0."TenantId") AND (l."LanguageId" = l0."Id"))
5. 0.018 1.731 ↑ 2.5 24 1

Nested Loop (cost=9.83..40.52 rows=61 width=75) (actual time=0.436..1.731 rows=24 loops=1)

6. 0.029 0.378 ↑ 1.0 3 1

Hash Join (cost=9.27..10.59 rows=3 width=59) (actual time=0.357..0.378 rows=3 loops=1)

  • Hash Cond: ((s."StatusName")::text = (i1."Name")::text)
7. 0.020 0.020 ↑ 1.0 21 1

Seq Scan on "Statuses" s (cost=0.00..1.21 rows=21 width=36) (actual time=0.013..0.020 rows=21 loops=1)

8. 0.009 0.329 ↑ 1.0 1 1

Hash (cost=9.26..9.26 rows=1 width=44) (actual time=0.329..0.329 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.003 0.320 ↑ 1.0 1 1

Nested Loop (cost=7.16..9.26 rows=1 width=44) (actual time=0.316..0.320 rows=1 loops=1)

  • Join Filter: (n."Id" = n1."NodeId")
10. 0.019 0.298 ↑ 1.0 1 1

Hash Join (cost=7.02..8.36 rows=1 width=60) (actual time=0.295..0.298 rows=1 loops=1)

  • Hash Cond: (i1."Id" = i0."StatusId")
11. 0.013 0.013 ↑ 1.0 24 1

Seq Scan on "InstrumentationStatus" i1 (cost=0.00..1.24 rows=24 width=17) (actual time=0.010..0.013 rows=24 loops=1)

12. 0.008 0.266 ↑ 1.0 1 1

Hash (cost=7.00..7.00 rows=1 width=59) (actual time=0.266..0.266 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.010 0.258 ↑ 1.0 1 1

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

14. 0.026 0.218 ↓ 6.0 6 1

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

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

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

16. 0.025 0.176 ↓ 3.0 6 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.022 0.151 ↓ 3.0 6 1

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

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

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

  • Filter: (("TenantId" = 2) AND ("ProjectId" = 2))
  • Rows Removed by Filter: 67
19. 0.005 0.027 ↑ 1.0 3 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.022 0.022 ↑ 1.0 3 1

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

  • Filter: ("IsArea" = 1)
  • Rows Removed by Filter: 23
21. 0.030 0.030 ↓ 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.005..0.005 rows=0 loops=6)

  • Index Cond: ("Id" = i."InstrumentationId")
  • Filter: ("ParentId" = 0)
  • Rows Removed by Filter: 1
22. 0.019 0.019 ↑ 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.018..0.019 rows=1 loops=1)

  • Index Cond: ("NodeId" = i."NodeId")
  • Heap Fetches: 1
23. 1.335 1.335 ↑ 2.5 8 3

Index Only Scan using "LanguageDescription_VIDX" on "LanguageDescription" l (cost=0.56..9.78 rows=20 width=32) (actual time=0.434..0.445 rows=8 loops=3)

  • Index Cond: ("CommonId" = s."LanguageDescriptionId")
  • Filter: (s."TenantId" = "TenantId")
  • Heap Fetches: 24
24. 0.007 0.037 ↑ 1.0 3 1

Hash (cost=1.30..1.30 rows=3 width=16) (actual time=0.037..0.037 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
25. 0.030 0.030 ↑ 1.0 3 1

Seq Scan on "Language" l0 (cost=0.00..1.30 rows=3 width=16) (actual time=0.027..0.030 rows=3 loops=1)

  • Filter: ("LocalId" = 1,031)
  • Rows Removed by Filter: 21
26. 0.888 0.888 ↑ 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.296..0.296 rows=1 loops=3)

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