explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b76v

Settings
# exclusive inclusive rows x rows loops node
1. 0.244 3.910 ↑ 1.5 35 1

Unique (cost=145.85..149.83 rows=53 width=342) (actual time=3.602..3.910 rows=35 loops=1)

2. 0.589 3.666 ↑ 1.0 53 1

Sort (cost=145.85..145.98 rows=53 width=342) (actual time=3.597..3.666 rows=53 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: 51kB
3. 0.299 3.077 ↑ 1.0 53 1

Nested Loop (cost=94.04..144.33 rows=53 width=342) (actual time=1.100..3.077 rows=53 loops=1)

  • Join Filter: (main.id = principals_1.id)
4. 0.308 2.407 ↑ 1.0 53 1

Nested Loop (cost=93.61..119.46 rows=53 width=350) (actual time=1.076..2.407 rows=53 loops=1)

  • Join Filter: (cachedgroupmembers_2.memberid = main.id)
5. 0.387 1.728 ↑ 1.0 53 1

Merge Join (cost=93.19..95.54 rows=53 width=8) (actual time=1.056..1.728 rows=53 loops=1)

  • Merge Cond: (cachedgroupmembers_4.memberid = cachedgroupmembers_2.memberid)
6. 0.248 1.120 ↑ 1.0 82 1

Sort (cost=92.76..92.96 rows=82 width=4) (actual time=1.007..1.120 rows=82 loops=1)

  • Sort Key: cachedgroupmembers_4.memberid
  • Sort Method: quicksort Memory: 28kB
7. 0.282 0.872 ↑ 1.0 82 1

Nested Loop (cost=6.83..90.15 rows=82 width=4) (actual time=0.217..0.872 rows=82 loops=1)

8. 0.233 0.335 ↑ 1.0 15 1

Bitmap Heap Scan on acl acl_3 (cost=6.39..60.11 rows=15 width=4) (actual time=0.130..0.335 rows=15 loops=1)

  • Recheck Cond: ((((rightname)::text = 'OwnTicket'::text) AND ((principaltype)::text = 'Group'::text)) OR (((rightname)::text = 'SuperUser'::text) AND ((principaltype)::text = 'Group'::text)))
  • Filter: ((((objecttype)::text = 'RT::Queue'::text) AND (objectid = 55)) OR (((objecttype)::text = 'RT::System'::text) AND (objectid = 1)))
  • Rows Removed by Filter: 192
  • Heap Blocks: exact=48
9. 0.004 0.102 ↓ 0.0 0 1

BitmapOr (cost=6.39..6.39 rows=208 width=0) (actual time=0.101..0.102 rows=0 loops=1)

10. 0.078 0.078 ↑ 1.0 199 1

Bitmap Index Scan on acl1 (cost=0.00..4.92 rows=201 width=0) (actual time=0.077..0.078 rows=199 loops=1)

  • Index Cond: (((rightname)::text = 'OwnTicket'::text) AND ((principaltype)::text = 'Group'::text))
11. 0.020 0.020 ↓ 1.1 8 1

Bitmap Index Scan on acl1 (cost=0.00..1.46 rows=7 width=0) (actual time=0.018..0.020 rows=8 loops=1)

  • Index Cond: (((rightname)::text = 'SuperUser'::text) AND ((principaltype)::text = 'Group'::text))
12. 0.255 0.255 ↑ 1.0 5 15

Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_4 (cost=0.43..1.95 rows=5 width=8) (actual time=0.007..0.017 rows=5 loops=15)

  • Index Cond: ((groupid = acl_3.principalid) AND (disabled = 0))
  • Heap Fetches: 0
13. 0.221 0.221 ↓ 1.0 131 1

Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_2 (cost=0.43..1.91 rows=129 width=4) (actual time=0.021..0.221 rows=131 loops=1)

  • Index Cond: ((groupid = 4) AND (disabled = 0))
  • Heap Fetches: 0
14. 0.371 0.371 ↑ 1.0 1 53

Index Scan using users_pkey on users main (cost=0.42..0.44 rows=1 width=342) (actual time=0.007..0.007 rows=1 loops=53)

  • Index Cond: (id = cachedgroupmembers_4.memberid)
15. 0.371 0.371 ↑ 1.0 1 53

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

  • Index Cond: (id = cachedgroupmembers_4.memberid)
  • Filter: ((id <> 1) AND (disabled = 0) AND ((principaltype)::text = 'User'::text))
Planning time : 40.331 ms
Execution time : 7.962 ms