explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pzr

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

Limit (cost=252.72..687.05 rows=1 width=73) (actual time=4.756..4.756 rows=0 loops=1)

2. 0.003 4.757 ↓ 0.0 0 1

Nested Loop Left Join (cost=252.72..687.05 rows=1 width=73) (actual time=4.756..4.757 rows=0 loops=1)

  • Join Filter: (c.clinician_id = u.user_id)
  • Join Filter: (a.admin_id = u.user_id)
3. 0.000 4.754 ↓ 0.0 0 1

Nested Loop Left Join (cost=252.72..680.47 rows=1 width=54) (actual time=4.754..4.754 rows=0 loops=1)

4. 0.013 4.754 ↓ 0.0 0 1

Hash Join (cost=252.72..678.95 rows=1 width=22) (actual time=4.754..4.754 rows=0 loops=1)

  • Hash Cond: (pu.id = u.user_id)
  • Recheck Cond: ((search_terms ~~* format('%%%s%%'::text, '3IoP1HvZ')) OR (id = '3IoP1HvZ'::text))
  • Heap Blocks: exact=1
  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
5. 0.017 4.478 ↑ 109.0 1 1

Bitmap Heap Scan on users pu (cost=245.30..671.11 rows=109 width=22) (actual time=4.476..4.478 rows=1 loops=1)

6. 0.003 4.461 ↓ 0.0 0 1

BitmapOr (cost=245.30..245.30 rows=109 width=0) (actual time=4.460..4.461 rows=0 loops=1)

  • Index Cond: (search_terms ~~* format('%%%s%%'::text, '3IoP1HvZ'))
  • Index Cond: (id = '3IoP1HvZ'::text)
7. 4.434 4.434 ↑ 108.0 1 1

Bitmap Index Scan on users_search_terms_idx (cost=0.00..240.81 rows=108 width=0) (actual time=4.434..4.434 rows=1 loops=1)

8. 0.024 0.024 ↑ 1.0 1 1

Bitmap Index Scan on users_id_role_key (cost=0.00..4.44 rows=1 width=0) (actual time=0.024..0.024 rows=1 loops=1)

9. 0.124 0.263 ↓ 1.0 248 1

Hash (cost=4.41..4.41 rows=241 width=9) (actual time=0.263..0.263 rows=248 loops=1)

10. 0.139 0.139 ↓ 1.0 248 1

Seq Scan on users u (cost=0.00..4.41 rows=241 width=9) (actual time=0.006..0.139 rows=248 loops=1)

11. 0.000 0.000 ↓ 0.0 0

Seq Scan on admins a (cost=0.00..1.23 rows=23 width=32) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on clinicians c (cost=0.00..4.59 rows=159 width=9) (never executed)