explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U3mO

Settings
# exclusive inclusive rows x rows loops node
1. 0.726 0.859 ↑ 5.4 57 1

Sort (cost=67.33..68.10 rows=307 width=75) (actual time=0.828..0.859 rows=57 loops=1)

  • Sort Key: m3_users_rolepermissions.permission_code
  • Sort Method: quicksort Memory: 33kB
2. 0.020 0.133 ↑ 5.4 57 1

Nested Loop (cost=14.59..54.65 rows=307 width=75) (actual time=0.081..0.133 rows=57 loops=1)

3. 0.026 0.059 ↑ 2.0 1 1

Hash Join (cost=10.50..11.94 rows=2 width=8) (actual time=0.048..0.059 rows=1 loops=1)

  • Hash Cond: (m3_users_role.id = m3_users_assignedrole.role_id)
4. 0.013 0.013 ↑ 1.0 28 1

Seq Scan on m3_users_role (cost=0.00..1.28 rows=28 width=4) (actual time=0.011..0.013 rows=28 loops=1)

5. 0.003 0.020 ↑ 2.0 1 1

Hash (cost=10.48..10.48 rows=2 width=4) (actual time=0.020..0.020 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.017 0.017 ↑ 2.0 1 1

Index Scan using m3_users_assignedrole_user_id on m3_users_assignedrole (cost=0.29..10.48 rows=2 width=4) (actual time=0.016..0.017 rows=1 loops=1)

  • Index Cond: (user_id = 1000)
7. 0.032 0.054 ↑ 2.8 57 1

Bitmap Heap Scan on m3_users_rolepermissions (cost=4.09..19.76 rows=159 width=79) (actual time=0.031..0.054 rows=57 loops=1)

  • Recheck Cond: (role_id = m3_users_role.id)
  • Heap Blocks: exact=4
8. 0.022 0.022 ↑ 2.8 57 1

Bitmap Index Scan on m3_users_rolepermissions_role_id (cost=0.00..4.05 rows=159 width=0) (actual time=0.022..0.022 rows=57 loops=1)

  • Index Cond: (role_id = m3_users_role.id)
Planning time : 0.799 ms
Execution time : 0.943 ms