explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 91A2

Settings
# exclusive inclusive rows x rows loops node
1. 4,146.674 7,622.897 ↓ 16.3 1,608,488 1

Nested Loop (cost=3.73..25,666.18 rows=98,940 width=428) (actual time=0.190..7,622.897 rows=1,608,488 loops=1)

  • Buffers: shared hit=105915
2. 797.134 1,465.613 ↓ 10.2 201,061 1

Merge Join (cost=0.89..24,421.12 rows=19,788 width=363) (actual time=0.095..1,465.613 rows=201,061 loops=1)

  • Merge Cond: (main.id = principals_1.id)
  • Buffers: shared hit=105906
3. 301.654 301.654 ↑ 1.0 201,483 1

Index Scan using users_pkey on users main (cost=0.42..8,311.61 rows=201,483 width=350) (actual time=0.023..301.654 rows=201,483 loops=1)

  • Buffers: shared hit=30679
4. 366.825 366.825 ↓ 1.0 201,061 1

Index Scan using principals_type_id on principals principals_1 (cost=0.43..14,908.94 rows=199,621 width=13) (actual time=0.050..366.825 rows=201,061 loops=1)

  • Index Cond: ((principaltype)::text = 'User'::text)
  • Filter: ((id <> 1) AND (disabled = 0))
  • Rows Removed by Filter: 422
  • Buffers: shared hit=75227
5. 2,010.501 2,010.610 ↓ 1.6 8 201,061

Materialize (cost=2.84..8.33 rows=5 width=65) (actual time=0.001..0.010 rows=8 loops=201,061)

  • Buffers: shared hit=9
6. 0.050 0.109 ↓ 1.6 8 1

Bitmap Heap Scan on acl acl_3 (cost=2.84..8.31 rows=5 width=65) (actual time=0.074..0.109 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.008 0.059 ↓ 0.0 0 1

BitmapOr (cost=2.84..2.84 rows=5 width=0) (actual time=0.058..0.059 rows=0 loops=1)

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

Bitmap Index Scan on acl1 (cost=0.00..1.44 rows=4 width=0) (actual time=0.033..0.034 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.017 0.017 ↓ 2.0 2 1

Bitmap Index Scan on acl1 (cost=0.00..1.40 rows=1 width=0) (actual time=0.016..0.017 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
Planning time : 1.757 ms
Execution time : 9,309.686 ms