explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fIXm

Settings
# exclusive inclusive rows x rows loops node
1. 0.111 4.368 ↓ 18.0 18 1

Unique (cost=1,146.50..1,146.58 rows=1 width=398) (actual time=4.225..4.368 rows=18 loops=1)

  • Buffers: shared hit=630
2. 0.494 4.257 ↓ 28.0 28 1

Sort (cost=1,146.50..1,146.51 rows=1 width=398) (actual time=4.219..4.257 rows=28 loops=1)

  • Sort Key: main.name, main.id, main.password, main.comments, main.signature, main.emailaddress, main.freeformcontactinfo, main.organization, main.realname, main.nickname, main.lang, main.gecos, main.homephone, main.workphone, main.mobilephone, main.pagerphone, main.address1, main.address2, main.city, main.state, main.zip, main.country, main.timezone, main.creator, main.created, main.lastupdatedby, main.lastupdated, main.authtoken, main.smimecertificate
  • Sort Method: quicksort Memory: 41kB
  • Buffers: shared hit=630
3. 0.138 3.763 ↓ 28.0 28 1

Nested Loop (cost=996.83..1,146.49 rows=1 width=398) (actual time=2.868..3.763 rows=28 loops=1)

  • Join Filter: (main.id = principals_1.id)
  • Buffers: shared hit=630
4. 0.180 3.317 ↑ 2.1 28 1

Hash Join (cost=996.40..1,118.31 rows=60 width=406) (actual time=2.843..3.317 rows=28 loops=1)

  • Hash Cond: (cachedgroupmembers_4.memberid = main.id)
  • Buffers: shared hit=518
5. 0.178 0.494 ↑ 561.7 50 1

Nested Loop (cost=3.28..19.27 rows=28,084 width=4) (actual time=0.162..0.494 rows=50 loops=1)

  • Buffers: shared hit=34
6. 0.054 0.140 ↓ 1.6 8 1

Bitmap Heap Scan on acl acl_3 (cost=2.84..8.31 rows=5 width=4) (actual time=0.101..0.140 rows=8 loops=1)

  • Recheck Cond: ((((rightname)::text = 'OwnTicket'::text) AND ((objecttype)::text = 'RT::Queue'::text) AND (objectid = 19) AND ((principaltype)::text = 'Group'::text)) OR (((rightname)::text = 'OwnTicket'::text) AND ((objecttype)::text = 'RT::System'::text) AND (objectid = 1) AND ((principaltype)::text = 'Group'::text)))
  • Heap Blocks: exact=5
  • Buffers: shared hit=9
7. 0.007 0.086 ↓ 0.0 0 1

BitmapOr (cost=2.84..2.84 rows=5 width=0) (actual time=0.085..0.086 rows=0 loops=1)

  • Buffers: shared hit=4
8. 0.060 0.060 ↓ 1.5 6 1

Bitmap Index Scan on acl1 (cost=0.00..1.44 rows=4 width=0) (actual time=0.058..0.060 rows=6 loops=1)

  • Index Cond: (((rightname)::text = 'OwnTicket'::text) AND ((objecttype)::text = 'RT::Queue'::text) AND (objectid = 19) AND ((principaltype)::text = 'Group'::text))
  • Buffers: shared hit=2
9. 0.019 0.019 ↓ 2.0 2 1

Bitmap Index Scan on acl1 (cost=0.00..1.40 rows=1 width=0) (actual time=0.017..0.019 rows=2 loops=1)

  • Index Cond: (((rightname)::text = 'OwnTicket'::text) AND ((objecttype)::text = 'RT::System'::text) AND (objectid = 1) AND ((principaltype)::text = 'Group'::text))
  • Buffers: shared hit=2
10. 0.176 0.176 ↑ 3.7 6 8

Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_4 (cost=0.43..1.97 rows=22 width=8) (actual time=0.012..0.022 rows=6 loops=8)

  • Index Cond: ((groupid = acl_3.principalid) AND (disabled = 0))
  • Heap Fetches: 0
  • Buffers: shared hit=25
11. 0.602 2.643 ↑ 3.6 119 1

Hash (cost=987.79..987.79 rows=427 width=402) (actual time=2.641..2.643 rows=119 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
  • Buffers: shared hit=484
12. 0.790 2.041 ↑ 3.6 119 1

Nested Loop (cost=0.85..987.79 rows=427 width=402) (actual time=0.105..2.041 rows=119 loops=1)

  • Buffers: shared hit=484
13. 0.291 0.291 ↑ 3.6 120 1

Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_2 (cost=0.43..11.17 rows=427 width=4) (actual time=0.051..0.291 rows=120 loops=1)

  • Index Cond: ((groupid = 4) AND (disabled = 0))
  • Heap Fetches: 0
  • Buffers: shared hit=5
14. 0.960 0.960 ↑ 1.0 1 120

Index Scan using users_pkey on users main (cost=0.42..2.29 rows=1 width=398) (actual time=0.008..0.008 rows=1 loops=120)

  • Index Cond: (id = cachedgroupmembers_2.memberid)
  • Buffers: shared hit=479
15. 0.308 0.308 ↑ 1.0 1 28

Index Scan using principals_pkey on principals principals_1 (cost=0.43..0.46 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=28)

  • Index Cond: (id = cachedgroupmembers_4.memberid)
  • Filter: ((id <> 1) AND (disabled = 0) AND ((principaltype)::text = 'User'::text))
  • Buffers: shared hit=112
Planning time : 7.685 ms
Execution time : 4.857 ms