explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vlsr

Settings
# exclusive inclusive rows x rows loops node
1. 4,438.386 8,149.008 ↓ 16.3 1,608,488 1

Nested Loop (cost=1,003.73..54,475.06 rows=98,940 width=428) (actual time=1.490..8,149.008 rows=1,608,488 loops=1)

  • Buffers: shared hit=301431
2. 1,005.683 1,700.012 ↓ 10.2 201,061 1

Gather (cost=1,000.89..53,229.99 rows=19,788 width=363) (actual time=1.414..1,700.012 rows=201,061 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
  • Buffers: shared hit=301422
3. 288.203 694.329 ↓ 7.9 50,265 4 / 4

Merge Join (cost=0.89..50,251.19 rows=6,383 width=363) (actual time=1.063..694.329 rows=50,265 loops=4)

  • Merge Cond: (principals_1.id = main.id)
  • Buffers: shared hit=301422
4. 316.357 316.357 ↑ 1.3 50,265 4 / 4

Parallel Index Scan using principals_pkey on principals principals_1 (cost=0.43..41,211.05 rows=64,394 width=13) (actual time=0.086..316.357 rows=50,265 loops=4)

  • Filter: ((id <> 1) AND (disabled = 0) AND ((principaltype)::text = 'User'::text))
  • Rows Removed by Filter: 457865
  • Buffers: shared hit=270256
5. 89.769 89.769 ↑ 3.9 51,015 4 / 4

Index Scan using users_pkey on users main (cost=0.42..8,311.61 rows=201,483 width=350) (actual time=0.076..89.769 rows=51,015 loops=4)

  • Buffers: shared hit=31166
6. 2,010.527 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
7. 0.035 0.083 ↓ 1.6 8 1

Bitmap Heap Scan on acl acl_3 (cost=2.84..8.31 rows=5 width=65) (actual time=0.060..0.083 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
8. 0.004 0.048 ↓ 0.0 0 1

BitmapOr (cost=2.84..2.84 rows=5 width=0) (actual time=0.047..0.048 rows=0 loops=1)

  • Buffers: shared hit=4
9. 0.032 0.032 ↓ 1.5 6 1

Bitmap Index Scan on acl1 (cost=0.00..1.44 rows=4 width=0) (actual time=0.031..0.032 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
10. 0.012 0.012 ↓ 2.0 2 1

Bitmap Index Scan on acl1 (cost=0.00..1.40 rows=1 width=0) (actual time=0.011..0.012 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.500 ms
Execution time : 9,919.527 ms