explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3wjN

Settings
# exclusive inclusive rows x rows loops node
1. 1.036 436.505 ↑ 1.1 321 1

Sort (cost=1,194,079.05..1,194,079.92 rows=348 width=31) (actual time=436.443..436.505 rows=321 loops=1)

  • Sort Key: courses.name
  • Sort Method: quicksort Memory: 58kB
2. 1.379 435.469 ↑ 1.1 321 1

Bitmap Heap Scan on courses (cost=44.40..1,194,064.36 rows=348 width=31) (actual time=1.906..435.469 rows=321 loops=1)

  • Recheck Cond: ((owner_id IS NULL) OR (owner_id = 32679))
  • Filter: (active AND (((available_for_subscription OR (available_for_subscription IS NULL)) AND (owner_id IS NULL) AND ((NOT private) OR (private IS NULL))) OR (owner_id = 32679)))
  • Rows Removed by Filter: 701
  • Heap Blocks: exact=311
3. 0.001 0.098 ↓ 0.0 0 1

BitmapOr (cost=44.40..44.40 rows=1,022 width=0) (actual time=0.098..0.098 rows=0 loops=1)

4. 0.072 0.072 ↑ 1.0 750 1

Bitmap Index Scan on index_courses_on_owner_id (cost=0.00..29.91 rows=750 width=0) (actual time=0.072..0.072 rows=750 loops=1)

  • Index Cond: (owner_id IS NULL)
5. 0.025 0.025 ↓ 1.0 279 1

Bitmap Index Scan on index_courses_on_owner_id (cost=0.00..14.32 rows=272 width=0) (actual time=0.025..0.025 rows=279 loops=1)

  • Index Cond: (owner_id = 32679)
6.          

SubPlan (forBitmap Heap Scan)

7. 84.102 433.992 ↑ 1.0 1 321

Aggregate (cost=3,429.51..3,429.52 rows=1 width=0) (actual time=1.351..1.352 rows=1 loops=321)

8. 303.024 349.890 ↓ 2.4 1,176 321

Bitmap Heap Scan on logins (cost=52.93..3,428.30 rows=485 width=0) (actual time=0.235..1.090 rows=1,176 loops=321)

  • Recheck Cond: (account_id = 32679)
  • Filter: ((NOT (hashed SubPlan 1)) AND (role_id = 11))
  • Rows Removed by Filter: 26
  • Heap Blocks: exact=220848
9. 39.804 39.804 ↓ 1.1 1,202 321

Bitmap Index Scan on "index_ole_core.logins_on_account_id" (cost=0.00..28.68 rows=1,101 width=0) (actual time=0.124..0.124 rows=1,202 loops=321)

  • Index Cond: (account_id = 32679)
10.          

SubPlan (forBitmap Heap Scan)

11. 7.062 7.062 ↓ 4.4 22 321

Index Scan using index_train_sessions_on_account_id_and_course_id on train_sessions (cost=0.42..24.11 rows=5 width=4) (actual time=0.006..0.022 rows=22 loops=321)

  • Index Cond: ((account_id = 32679) AND (course_id = courses.id))
Planning time : 0.285 ms
Execution time : 436.737 ms