explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mu88

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 2.542 ↑ 90.0 1 1

Hash Join (cost=123.32..127.47 rows=90 width=259) (actual time=2.531..2.542 rows=1 loops=1)

  • Hash Cond: (institutes.id = institutes_1.id)
2. 0.011 0.011 ↑ 1.0 90 1

Seq Scan on institutes (cost=0.00..3.90 rows=90 width=259) (actual time=0.005..0.011 rows=90 loops=1)

3. 0.001 2.516 ↑ 90.0 1 1

Hash (cost=122.19..122.19 rows=90 width=16) (actual time=2.516..2.516 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
4. 0.008 2.515 ↑ 90.0 1 1

HashAggregate (cost=120.39..121.29 rows=90 width=16) (actual time=2.515..2.515 rows=1 loops=1)

  • Group Key: institutes_1.id
5. 0.248 2.507 ↑ 12.0 34 1

Nested Loop (cost=4.37..119.37 rows=408 width=16) (actual time=2.291..2.507 rows=34 loops=1)

  • Join Filter: (((registry_acl.institute_id IS NULL) OR (registry_acl.institute_id = institutes_1.id)) AND ((bacl.institute_id IS NULL) OR (bacl.institute_id = institutes_1.id)))
  • Rows Removed by Join Filter: 3026
6. 0.009 0.009 ↑ 1.0 90 1

Seq Scan on institutes institutes_1 (cost=0.00..3.90 rows=90 width=16) (actual time=0.001..0.009 rows=90 loops=1)

7. 0.083 2.250 ↓ 1.4 34 90

Materialize (cost=4.37..76.16 rows=25 width=32) (actual time=0.001..0.025 rows=34 loops=90)

8. 2.081 2.167 ↓ 1.4 34 1

Nested Loop (cost=4.37..76.04 rows=25 width=32) (actual time=0.119..2.167 rows=34 loops=1)

  • Join Filter: ((registry_acl.permission = 'frm_create'::text) OR ('{read_institute_bio_sample,read_admin_bio_sample}'::text[] @> to_biobank_perm_flags(bacl.permission_mask)))
  • Rows Removed by Join Filter: 170
9. 0.018 0.018 ↑ 1.0 17 1

Seq Scan on biobank_acl bacl (cost=0.00..4.66 rows=17 width=36) (actual time=0.005..0.018 rows=17 loops=1)

  • Filter: (trustee_id = 'a342fa7e-4300-11e8-b98e-c708e2493908'::uuid)
  • Rows Removed by Filter: 116
10. 0.029 0.068 ↓ 1.5 12 17

Materialize (cost=4.37..35.01 rows=8 width=42) (actual time=0.001..0.004 rows=12 loops=17)

11. 0.005 0.039 ↓ 1.5 12 1

Nested Loop (cost=4.37..34.97 rows=8 width=42) (actual time=0.017..0.039 rows=12 loops=1)

12. 0.021 0.021 ↑ 1.0 1 1

Seq Scan on users_user_groups (cost=0.00..6.88 rows=1 width=32) (actual time=0.006..0.021 rows=1 loops=1)

  • Filter: (user_id = 'a342fa7e-4300-11e8-b98e-c708e2493908'::uuid)
  • Rows Removed by Filter: 309
13. 0.007 0.013 ↓ 1.1 12 1

Bitmap Heap Scan on registry_acl (cost=4.37..27.99 rows=11 width=42) (actual time=0.009..0.013 rows=12 loops=1)

  • Recheck Cond: (user_group_id = users_user_groups.user_group_id)
  • Heap Blocks: exact=3
14. 0.006 0.006 ↓ 1.1 12 1

Bitmap Index Scan on registry_acl_user_group_id_idx (cost=0.00..4.36 rows=11 width=0) (actual time=0.005..0.006 rows=12 loops=1)

  • Index Cond: (user_group_id = users_user_groups.user_group_id)
Planning time : 0.589 ms
Execution time : 2.587 ms