explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g0m : HH on TP1

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 288,646.924 ↓ 0.0 0 1

Limit (cost=911,922.96..948,157.32 rows=200 width=463) (actual time=288,646.923..288,646.924 rows=0 loops=1)

2. 0.001 288,646.923 ↓ 0.0 0 1

Nested Loop (cost=6,063.92..58,366,394.51 rows=322,127 width=463) (actual time=288,646.923..288,646.923 rows=0 loops=1)

3. 0.001 288,646.922 ↓ 0.0 0 1

Merge Semi Join (cost=6,063.49..58,168,026.79 rows=213,717 width=467) (actual time=288,646.922..288,646.922 rows=0 loops=1)

  • Merge Cond: ("Extent1"."CustomerAccountId" = "Extent3"."CustomerAccountId")
  • Join Filter: (("Extent1"."UserId")::text = ("Extent3"."UserId")::text)
4. 3,998.666 288,646.921 ↓ 0.0 0 1

Index Scan using ix_user_tenantid_customeraccountid on "User" "Extent1" (cost=0.43..56,060,642.84 rows=1,599,866 width=463) (actual time=288,646.921..288,646.921 rows=0 loops=1)

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

SubPlan (for Index Scan)

6. 3,526.540 284,648.255 ↓ 0.0 0 3,198,295

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

  • Merge Cond: ("Extent4"."UserAttributeId" = "Extent5"."UserAttributeId")
7. 79,957.375 79,957.375 ↑ 1.0 1 3,198,295

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

  • Index Cond: (("TenantId" = "Extent1"."TenantId") AND ("CustomerAccountId" = "Extent1"."CustomerAccountId") AND ("UserId" = ("Extent1"."UserId")::text))
  • Heap Fetches: 3094852
8. 201,164.340 201,164.340 ↓ 0.0 0 3,094,836

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

  • 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,076,994.07 rows=2,216,557 width=40) (never executed)

  • Index Cond: ("TenantId" = 24871)
  • 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.500 ms
Execution time : 288,647.023 ms