explain.depesz.com

PostgreSQL's explain analyze made readable

Result: He4V

Settings
# exclusive inclusive rows x rows loops node
1. 0.964 35.962 ↓ 58.0 58 1

Sort (cost=88.31..88.32 rows=1 width=20) (actual time=35.501..35.962 rows=58 loops=1)

  • Sort Key: "user".id
  • Sort Method: quicksort Memory: 29kB
2. 1.582 34.998 ↓ 58.0 58 1

Bitmap Heap Scan on "user" (cost=8.60..88.30 rows=1 width=20) (actual time=0.176..34.998 rows=58 loops=1)

  • Recheck Cond: ((("accountId" = 84) AND ("organizationId" = 3) AND ("deletedAt" IS NULL)) OR (("accountId" = 84) AND ("accountId" = 84) AND ("deletedAt" IS NULL)))
  • Heap Blocks: exact=42
3. 0.017 0.066 ↓ 0.0 0 1

BitmapOr (cost=8.60..8.60 rows=1 width=0) (actual time=0.058..0.066 rows=0 loops=1)

4. 0.023 0.023 ↑ 1.0 1 1

Bitmap Index Scan on user_unique_per_account_and_organization_key (cost=0.00..4.30 rows=1 width=0) (actual time=0.016..0.023 rows=1 loops=1)

  • Index Cond: (("accountId" = 84) AND ("organizationId" = 3) AND ("deletedAt" IS NULL))
5. 0.026 0.026 ↓ 58.0 58 1

Bitmap Index Scan on user_unique_per_account_and_organization_key (cost=0.00..4.30 rows=1 width=0) (actual time=0.018..0.026 rows=58 loops=1)

  • Index Cond: (("accountId" = 84) AND ("accountId" = 84) AND ("deletedAt" IS NULL))
6.          

SubPlan (for Bitmap Heap Scan)

7. 15.428 33.350 ↑ 1.0 1 58

Aggregate (cost=75.68..75.69 rows=1 width=4) (actual time=0.567..0.575 rows=1 loops=58)

8. 17.922 17.922 ↓ 1.3 28 58

Index Scan using session_user_id on session (cost=0.42..75.63 rows=21 width=8) (actual time=0.018..0.309 rows=28 loops=58)

  • Index Cond: ("userId" = "user".id)
Planning time : 0.306 ms
Execution time : 36.721 ms