explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XfeV

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.083 ↑ 1.3 3 1

HashAggregate (cost=6.31..6.35 rows=4 width=65) (actual time=0.082..0.083 rows=3 loops=1)

  • Group Key: ($0), ('{}'::text[]), ('{}'::bytea[])
2. 0.000 0.075 ↑ 1.3 3 1

Append (cost=1.44..6.28 rows=4 width=65) (actual time=0.032..0.075 rows=3 loops=1)

3. 0.003 0.032 ↑ 1.0 1 1

Result (cost=1.44..1.45 rows=1 width=65) (actual time=0.032..0.032 rows=1 loops=1)

4.          

Initplan (for Result)

5. 0.029 0.029 ↑ 1.0 1 1

Seq Scan on users_admin_groups (cost=0.00..1.44 rows=1 width=0) (actual time=0.029..0.029 rows=1 loops=1)

  • Filter: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (user_id = '\x5ecb8bcdf92ea1055f7c662a'::bytea))
  • Rows Removed by Filter: 11
6. 0.010 0.032 ↑ 1.0 2 1

HashAggregate (cost=2.28..2.31 rows=2 width=49) (actual time=0.031..0.032 rows=2 loops=1)

  • Group Key: users_permission_groups.permissions
7. 0.007 0.022 ↓ 1.7 5 1

Hash Join (cost=1.16..2.27 rows=3 width=29) (actual time=0.020..0.022 rows=5 loops=1)

  • Hash Cond: (users_permission_groups.group_id = users_groups_to_users_association.group_id)
8. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on users_permission_groups (cost=0.00..1.09 rows=5 width=42) (actual time=0.004..0.005 rows=5 loops=1)

  • Filter: (company_id = '\x50613a5da3815e1953543666'::bytea)
  • Rows Removed by Filter: 2
9. 0.004 0.010 ↓ 1.2 5 1

Hash (cost=1.11..1.11 rows=4 width=26) (actual time=0.010..0.010 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
10. 0.006 0.006 ↓ 1.2 5 1

Seq Scan on users_groups_to_users_association (cost=0.00..1.11 rows=4 width=26) (actual time=0.005..0.006 rows=5 loops=1)

  • Filter: ((company_id = '\x50613a5da3815e1953543666'::bytea) AND (user_id = '\x5ecb8bcdf92ea1055f7c662a'::bytea))
  • Rows Removed by Filter: 2
11. 0.011 0.011 ↓ 0.0 0 1

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

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