explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oBU

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 15,403.824 ↑ 2.0 23 1

Nested Loop (cost=21,701.12..21,827.65 rows=45 width=575) (actual time=15,403.783..15,403.824 rows=23 loops=1)

2. 0.006 15,403.217 ↑ 1.0 1 1

Result (cost=21,688.77..21,688.78 rows=1 width=32) (actual time=15,403.217..15,403.217 rows=1 loops=1)

3.          

Initplan (forResult)

4. 0.047 15,403.211 ↑ 1.0 1 1

Result (cost=21,688.76..21,688.77 rows=1 width=32) (actual time=15,403.211..15,403.211 rows=1 loops=1)

5.          

Initplan (forResult)

6. 0.033 15,403.164 ↓ 173.0 173 1

Subquery Scan on p (cost=3,352.97..21,688.76 rows=1 width=16) (actual time=2,154.400..15,403.164 rows=173 loops=1)

7. 0.052 15,403.131 ↓ 173.0 173 1

Nested Loop (cost=3,352.97..21,688.75 rows=1 width=241) (actual time=2,154.399..15,403.131 rows=173 loops=1)

8.          

CTE curr_usr

9. 0.004 2.359 ↑ 1.0 1 1

Limit (cost=0.25..0.26 rows=1 width=96) (actual time=2.357..2.359 rows=1 loops=1)

10. 2.355 2.355 ↑ 1,000.0 1 1

Function Scan on bim_get_current_user_table (cost=0.25..10.25 rows=1,000 width=96) (actual time=2.355..2.355 rows=1 loops=1)

11. 2.369 2.369 ↑ 1.0 1 1

CTE Scan on curr_usr u (cost=0.00..0.02 rows=1 width=64) (actual time=2.365..2.369 rows=1 loops=1)

12. 13,403.867 15,400.710 ↓ 173.0 173 1

Bitmap Heap Scan on perm p_1 (cost=3,352.71..21,688.46 rows=1 width=179) (actual time=2,152.019..15,400.710 rows=173 loops=1)

  • Recheck Cond: (u.member_of && readers)
  • Rows Removed by Index Recheck: 182949
  • Filter: ((NOT is_deleted) AND ((u.owner_system)::text = owner_system))
  • Rows Removed by Filter: 403020
  • Heap Blocks: exact=80607
13. 1,996.843 1,996.843 ↓ 208.7 1,232,848 1

Bitmap Index Scan on perm_idx_readers (cost=0.00..3,352.70 rows=5,906 width=0) (actual time=1,996.843..1,996.843 rows=1,232,848 loops=1)

  • Index Cond: (u.member_of && readers)
14. 0.049 0.592 ↑ 2.0 23 1

Bitmap Heap Scan on change c (cost=12.35..138.41 rows=45 width=575) (actual time=0.554..0.592 rows=23 loops=1)

  • Recheck Cond: (scope_id && ($4))
  • Heap Blocks: exact=8
15. 0.543 0.543 ↑ 2.0 23 1

Bitmap Index Scan on change_idx_scope_id (cost=0.00..12.34 rows=45 width=0) (actual time=0.543..0.543 rows=23 loops=1)

  • Index Cond: (scope_id && ($4))
Planning time : 0.502 ms