explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0h3WS : HH 3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 34,858.893 ↓ 0.0 0 1

Limit (cost=185,763.31..222,915.69 rows=200 width=463) (actual time=34,858.893..34,858.893 rows=0 loops=1)

2. 0.001 34,858.893 ↓ 0.0 0 1

Nested Loop (cost=1.43..59,839,849.43 rows=322,132 width=463) (actual time=34,858.893..34,858.893 rows=0 loops=1)

3. 0.001 34,858.892 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.99..59,641,479.86 rows=213,717 width=467) (actual time=34,858.892..34,858.892 rows=0 loops=1)

4. 2,875.711 34,858.891 ↓ 0.0 0 1

Index Scan using ix_user_tenantid_customeraccountid on "User" "Extent1" (cost=0.43..56,061,137.19 rows=1,599,880 width=463) (actual time=34,858.891..34,858.891 rows=0 loops=1)

  • Index Cond: ("TenantId" = 24871)
  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 3198318
5.          

SubPlan (for Index Scan)

6. 724.227 31,983.180 ↓ 0.0 0 3,198,318

Merge Semi Join (cost=1.12..17.19 rows=1 width=0) (actual time=0.010..0.010 rows=0 loops=3,198,318)

  • Merge Cond: ("Extent4"."UserAttributeId" = "Extent5"."UserAttributeId")
7. 9,594.954 9,594.954 ↑ 1.0 1 3,198,318

Index Only Scan using "PK_UserAttribute" on "UserAttribute" "Extent4" (cost=0.56..8.58 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=3,198,318)

  • Index Cond: (("TenantId" = "Extent1"."TenantId") AND ("CustomerAccountId" = "Extent1"."CustomerAccountId") AND ("UserId" = ("Extent1"."UserId")::text))
  • Heap Fetches: 3094857
8. 21,663.999 21,663.999 ↓ 0.0 0 3,094,857

Index Scan using "PK_UserAttributeValue" on "UserAttributeValue" "Extent5" (cost=0.56..8.59 rows=1 width=44) (actual time=0.007..0.007 rows=0 loops=3,094,857)

  • 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))
  • Rows Removed by Filter: 4
9. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_UserAttribute" on "UserAttribute" "Extent3" (cost=0.56..2.24 rows=1 width=40) (never executed)

  • Index Cond: (("TenantId" = 24871) AND ("CustomerAccountId" = "Extent1"."CustomerAccountId") AND (("UserId")::text = ("Extent1"."UserId")::text))
  • Filter: (("FullyQualifiedName")::text = 'tenant~preferred-store'::text)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_Account" on "Account" "Extent2" (cost=0.43..0.91 rows=2 width=8) (never executed)

  • Index Cond: (("TenantId" = 24871) AND ("CustomerAccountId" = "Extent1"."CustomerAccountId"))
  • Filter: ("CustomerSetId" = 1)
Planning time : 1.341 ms
Execution time : 34,859.001 ms