explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PAcm : HH TP1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,100,446.91..9,177,581.65 rows=322,127 width=463) (actual rows= loops=)

  • Join Filter: ("Extent2"."CustomerAccountId" = "Extent1"."CustomerAccountId")
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,100,446.35..1,412,802.89 rows=409,064 width=48) (actual rows= loops=)

  • Hash Cond: ("Extent2"."CustomerAccountId" = "Extent3"."CustomerAccountId")
3. 0.000 0.000 ↓ 0.0

Seq Scan on "Account" "Extent2" (cost=0.00..247,124.25 rows=3,030,717 width=8) (actual rows= loops=)

  • Filter: (("TenantId" = 24871) AND ("CustomerSetId" = 1))
4. 0.000 0.000 ↓ 0.0

Hash (cost=1,073,832.76..1,073,832.76 rows=1,310,207 width=40) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Unique (cost=1,051,667.15..1,073,832.76 rows=1,310,207 width=40) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=1,051,667.15..1,057,208.56 rows=2,216,561 width=40) (actual rows= loops=)

  • Sort Key: ""Extent3"".""CustomerAccountId"", ""Extent3"".""TenantId"", ((""Extent3"".""UserId"")::text)
7. 0.000 0.000 ↓ 0.0

Seq Scan on "UserAttribute" "Extent3" (cost=0.00..757,433.32 rows=2,216,561 width=40) (actual rows= loops=)

  • Filter: (("TenantId" = 24871) AND (("FullyQualifiedName")::text = 'tenant~preferred-store'::text))
8. 0.000 0.000 ↓ 0.0

Index Scan using "PK_User" on "User" "Extent1" (cost=0.56..18.97 rows=1 width=463) (actual rows= loops=)

  • Index Cond: (("TenantId" = 24871) AND ("CustomerAccountId" = "Extent3"."CustomerAccountId") AND (("UserId")::text = ("Extent3"."UserId")::text))
  • Filter: (SubPlan 1)
9.          

SubPlan (for Index Scan)

10. 0.000 0.000 ↓ 0.0

Merge Semi Join (cost=1.12..17.19 rows=1 width=0) (actual rows= loops=)

  • Merge Cond: ("Extent4"."UserAttributeId" = "Extent5"."UserAttributeId")
11. 0.000 0.000 ↓ 0.0

Index Only Scan using "PK_UserAttribute" on "UserAttribute" "Extent4" (cost=0.56..8.58 rows=1 width=44) (actual rows= loops=)

  • Index Cond: (("TenantId" = "Extent1"."TenantId") AND ("CustomerAccountId" = "Extent1"."CustomerAccountId") AND ("UserId" = ("Extent1"."UserId")::text))
12. 0.000 0.000 ↓ 0.0

Index Scan using "PK_UserAttributeValue" on "UserAttributeValue" "Extent5" (cost=0.56..8.59 rows=1 width=44) (actual rows= loops=)

  • Index Cond: (("TenantId" = "Extent1"."TenantId") AND ("CustomerAccountId" = "Extent1"."CustomerAccountId") AND (("UserId")::text = ("Extent1"."UserId")::text))
  • Filter: (("NumberValue" = '13712'::numeric) OR ("StringValue" = 'tenant~preferred-store'::citext))