explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v3wJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.100 21,045.792 ↓ 18.0 18 1

Unique (cost=783.58..783.66 rows=1 width=352) (actual time=21,045.668..21,045.792 rows=18 loops=1)

  • Buffers: shared hit=4607
2. 0.447 21,045.692 ↓ 28.0 28 1

Sort (cost=783.58..783.58 rows=1 width=352) (actual time=21,045.662..21,045.692 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=4607
3. 10,116.659 21,045.245 ↓ 28.0 28 1

Nested Loop (cost=4.26..783.57 rows=1 width=352) (actual time=0.674..21,045.245 rows=28 loops=1)

  • Join Filter: (cachedgroupmembers_4.groupid = acl_3.principalid)
  • Rows Removed by Join Filter: 6882852
  • Buffers: shared hit=4607
4. 1,964.372 3,185.346 ↓ 143,393.3 860,360 1

Nested Loop (cost=1.71..775.10 rows=6 width=356) (actual time=0.171..3,185.346 rows=860,360 loops=1)

  • Buffers: shared hit=4600
5. 0.782 28.042 ↓ 39.0 117 1

Nested Loop (cost=1.28..766.34 rows=3 width=360) (actual time=0.110..28.042 rows=117 loops=1)

  • Buffers: shared hit=953
6. 0.809 19.304 ↓ 4.2 117 1

Nested Loop (cost=0.86..753.30 rows=28 width=8) (actual time=0.084..19.304 rows=117 loops=1)

  • Buffers: shared hit=485
7. 0.375 0.375 ↑ 2.4 120 1

Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_2 (cost=0.43..8.33 rows=285 width=4) (actual time=0.035..0.375 rows=120 loops=1)

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

Index Scan using principals_pkey on principals principals_1 (cost=0.43..2.61 rows=1 width=4) (actual time=0.151..0.151 rows=1 loops=120)

  • Index Cond: (id = cachedgroupmembers_2.memberid)
  • Filter: ((id <> 1) AND (disabled = 0) AND ((principaltype)::text = 'User'::text))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=480
9. 7.956 7.956 ↑ 1.0 1 117

Index Scan using users_pkey on users main (cost=0.42..0.47 rows=1 width=352) (actual time=0.068..0.068 rows=1 loops=117)

  • Index Cond: (id = principals_1.id)
  • Buffers: shared hit=468
10. 1,192.932 1,192.932 ↓ 91.9 7,354 117

Index Only Scan using cachedgroupmembers4 on cachedgroupmembers cachedgroupmembers_4 (cost=0.43..2.12 rows=80 width=8) (actual time=0.081..10.196 rows=7,354 loops=117)

  • Index Cond: ((memberid = principals_1.id) AND (disabled = 0))
  • Heap Fetches: 0
  • Buffers: shared hit=3647
11. 7,743.072 7,743.240 ↓ 1.6 8 860,360

Materialize (cost=2.54..8.03 rows=5 width=4) (actual time=0.001..0.009 rows=8 loops=860,360)

  • Buffers: shared hit=7
12. 0.061 0.168 ↓ 1.6 8 1

Bitmap Heap Scan on acl acl_3 (cost=2.54..8.01 rows=5 width=4) (actual time=0.125..0.168 rows=8 loops=1)

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

BitmapOr (cost=2.54..2.54 rows=5 width=0) (actual time=0.106..0.107 rows=0 loops=1)

  • Buffers: shared hit=2
14. 0.080 0.080 ↓ 1.5 6 1

Bitmap Index Scan on acl_objecttype_principalid_4_principaltype_rightname (cost=0.00..1.29 rows=4 width=0) (actual time=0.079..0.080 rows=6 loops=1)

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

Bitmap Index Scan on acl_objecttype_principalid_4_principaltype_rightname (cost=0.00..1.26 rows=1 width=0) (actual time=0.018..0.019 rows=2 loops=1)

  • Index Cond: (((objecttype)::text = 'RT::System'::text) AND (objectid = 1))
  • Buffers: shared hit=1
Planning time : 12.066 ms
Execution time : 21,046.106 ms