explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Lvu

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 72.113 ↑ 1.0 90 1

Hash Join (cost=368.73..372.88 rows=90 width=259) (actual time=72.088..72.113 rows=90 loops=1)

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

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

3. 0.013 72.073 ↑ 1.0 90 1

Hash (cost=367.60..367.60 rows=90 width=16) (actual time=72.073..72.073 rows=90 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
4. 0.084 72.060 ↑ 1.0 90 1

Group (cost=366.23..366.70 rows=90 width=16) (actual time=71.922..72.060 rows=90 loops=1)

  • Group Key: institutes_1.id
5. 0.279 71.976 ↓ 15.6 1,484 1

Sort (cost=366.23..366.47 rows=95 width=16) (actual time=71.921..71.976 rows=1,484 loops=1)

  • Sort Key: institutes_1.id
  • Sort Method: quicksort Memory: 118kB
6. 0.407 71.697 ↓ 15.6 1,484 1

Nested Loop (cost=17.80..363.11 rows=95 width=16) (actual time=1.147..71.697 rows=1,484 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: 3916
7. 0.010 0.010 ↑ 1.0 90 1

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

8. 0.168 71.280 ↓ 10.0 60 90

Materialize (cost=17.80..349.77 rows=6 width=32) (actual time=0.013..0.792 rows=60 loops=90)

9. 70.648 71.112 ↓ 10.0 60 1

Hash Join (cost=17.80..349.74 rows=6 width=32) (actual time=1.139..71.112 rows=60 loops=1)

  • Hash Cond: (registry_acl.user_group_id = users_user_groups.user_group_id)
  • Join Filter: (((users_user_groups.user_id = 'a342fa7e-4300-11e8-b98e-c708e2493908'::uuid) AND (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: 5868
10. 0.247 0.247 ↑ 1.0 2,326 1

Seq Scan on registry_acl (cost=0.00..56.26 rows=2,326 width=42) (actual time=0.006..0.247 rows=2,326 loops=1)

11. 0.030 0.217 ↑ 1.0 133 1

Hash (cost=16.13..16.13 rows=133 width=52) (actual time=0.217..0.217 rows=133 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
12. 0.053 0.187 ↑ 1.0 133 1

Hash Join (cost=9.97..16.13 rows=133 width=52) (actual time=0.124..0.187 rows=133 loops=1)

  • Hash Cond: (bacl.trustee_id = users_user_groups.user_id)
13. 0.021 0.021 ↑ 1.0 133 1

Seq Scan on biobank_acl bacl (cost=0.00..4.33 rows=133 width=36) (actual time=0.005..0.021 rows=133 loops=1)

14. 0.058 0.113 ↑ 1.0 310 1

Hash (cost=6.10..6.10 rows=310 width=32) (actual time=0.113..0.113 rows=310 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
15. 0.055 0.055 ↑ 1.0 310 1

Seq Scan on users_user_groups (cost=0.00..6.10 rows=310 width=32) (actual time=0.008..0.055 rows=310 loops=1)

Planning time : 1.204 ms
Execution time : 72.169 ms