explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fWwm

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.084 ↑ 1.7 3 1

HashAggregate (cost=11.80..11.85 rows=5 width=33) (actual time=0.084..0.084 rows=3 loops=1)

  • Group Key: ($0), ('{}'::text[])
2. 0.001 0.075 ↓ 1.2 6 1

Append (cost=2.36..11.77 rows=5 width=33) (actual time=0.021..0.075 rows=6 loops=1)

3. 0.002 0.021 ↑ 1.0 1 1

Result (cost=2.36..2.37 rows=1 width=33) (actual time=0.021..0.021 rows=1 loops=1)

4.          

Initplan (for Result)

5. 0.019 0.019 ↑ 1.0 1 1

Index Only Scan using users_admin_groups_pkey on users_admin_groups (cost=0.14..2.36 rows=1 width=0) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (user_id = '\x5ecb8bcdf92ea1055f7c662a'::bytea))
  • Heap Fetches: 1
6. 0.001 0.046 ↓ 1.7 5 1

Nested Loop (cost=0.27..6.86 rows=3 width=17) (actual time=0.038..0.046 rows=5 loops=1)

7. 0.015 0.015 ↓ 1.2 5 1

Index Only Scan using users_groups_to_users_association_pkey on users_groups_to_users_association (cost=0.13..3.51 rows=4 width=26) (actual time=0.013..0.015 rows=5 loops=1)

  • Index Cond: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (user_id = '\x5ecb8bcdf92ea1055f7c662a'::bytea))
  • Heap Fetches: 5
8. 0.030 0.030 ↑ 1.0 1 5

Index Scan using users_permission_groups_pkey on users_permission_groups (cost=0.13..0.98 rows=1 width=42) (actual time=0.006..0.006 rows=1 loops=5)

  • Index Cond: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (group_id = users_groups_to_users_association.group_id))
9. 0.007 0.007 ↓ 0.0 0 1

Index Scan using users_permissions_pkey on users_permissions (cost=0.27..2.49 rows=1 width=55) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (user_id = '\x5ecb8bcdf92ea1055f7c662a'::bytea))
Planning time : 0.405 ms
Execution time : 0.151 ms