explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ypiR

Settings
# exclusive inclusive rows x rows loops node
1. 42.135 74.150 ↓ 10.0 241 1

Bitmap Heap Scan on folder_master fol (cost=1,310.46..16,126.89 rows=24 width=54) (actual time=5.844..74.150 rows=241 loops=1)

  • Recheck Cond: (((created_by)::text = 'zicc232'::text) OR (scope = 1) OR (scope = 3) OR (scope = 5) OR (scope = ANY ('{2,4}'::integer[])))
  • Filter: ((asset_id = ANY ('{47,0,10}'::bigint[])) AND ((org_name IS NULL) OR (lower((org_name)::text) = 'iri solutions'::text)) AND (((created_by)::text = 'zicc232'::text) OR (scope = 1) OR (scope = 3) OR (scope = 5) OR ((scope = ANY ('{2,4}'::integer[])) AND (hashed SubPlan 1))))
  • Rows Removed by Filter: 44,247
  • Heap Blocks: exact=8,880
2. 0.002 4.629 ↓ 0.0 0 1

BitmapOr (cost=478.40..478.40 rows=45,109 width=0) (actual time=4.629..4.629 rows=0 loops=1)

3. 1.213 1.213 ↑ 1.0 1,597 1

Bitmap Index Scan on idx740 (cost=0.00..18.10 rows=1,623 width=0) (actual time=1.213..1.213 rows=1,597 loops=1)

  • Index Cond: ((created_by)::text = 'zicc232'::text)
4. 0.498 0.498 ↑ 1.1 4,123 1

Bitmap Index Scan on folder_master_scope (cost=0.00..47.99 rows=4,436 width=0) (actual time=0.498..0.498 rows=4,123 loops=1)

  • Index Cond: (scope = 1)
5. 0.014 0.014 ↓ 1.6 42 1

Bitmap Index Scan on folder_master_scope (cost=0.00..1.72 rows=26 width=0) (actual time=0.014..0.014 rows=42 loops=1)

  • Index Cond: (scope = 3)
6. 0.099 0.099 ↑ 1.1 1,067 1

Bitmap Index Scan on folder_master_scope (cost=0.00..13.54 rows=1,162 width=0) (actual time=0.099..0.099 rows=1,067 loops=1)

  • Index Cond: (scope = 5)
7. 2.803 2.803 ↑ 1.0 37,692 1

Bitmap Index Scan on folder_master_scope (cost=0.00..397.01 rows=37,862 width=0) (actual time=2.803..2.803 rows=37,692 loops=1)

  • Index Cond: (scope = ANY ('{2,4}'::integer[]))
8.          

SubPlan (for Bitmap Heap Scan)

9. 7.275 27.386 ↓ 21.1 26,953 1

HashAggregate (cost=816.10..828.87 rows=1,277 width=8) (actual time=24.799..27.386 rows=26,953 loops=1)

  • Group Key: folder_user_map.folder_id
10. 1.559 20.111 ↓ 21.1 26,963 1

Append (cost=761.76..812.91 rows=1,277 width=8) (actual time=0.149..20.111 rows=26,963 loops=1)

11. 0.044 0.156 ↑ 27.1 31 1

HashAggregate (cost=761.76..770.17 rows=841 width=8) (actual time=0.148..0.156 rows=31 loops=1)

  • Group Key: folder_user_map.folder_id
12. 0.086 0.112 ↑ 6.1 139 1

Bitmap Heap Scan on folder_user_map (cost=10.33..759.63 rows=853 width=8) (actual time=0.032..0.112 rows=139 loops=1)

  • Recheck Cond: ((user_id)::text = 'zicc232'::text)
  • Heap Blocks: exact=32
13. 0.026 0.026 ↑ 6.1 139 1

Bitmap Index Scan on inx_folder_user_map_index1 (cost=0.00..10.12 rows=853 width=0) (actual time=0.026..0.026 rows=139 loops=1)

  • Index Cond: ((user_id)::text = 'zicc232'::text)
14. 11.379 18.396 ↓ 61.8 26,932 1

HashAggregate (cost=19.22..23.58 rows=436 width=8) (actual time=13.800..18.396 rows=26,932 loops=1)

  • Group Key: folder_grp_map.folder_id
15. 2.954 7.017 ↓ 97.8 42,633 1

Nested Loop (cost=0.84..18.13 rows=436 width=8) (actual time=0.034..7.017 rows=42,633 loops=1)

16. 0.005 0.033 ↓ 4.3 13 1

Unique (cost=0.42..1.58 rows=3 width=8) (actual time=0.020..0.033 rows=13 loops=1)

17. 0.028 0.028 ↓ 4.3 13 1

Index Only Scan using uk_usrgrp on adm_grp_usr_map (cost=0.42..1.57 rows=3 width=8) (actual time=0.019..0.028 rows=13 loops=1)

  • Index Cond: (user_id = 'zicc232'::text)
  • Heap Fetches: 3
18. 4.030 4.030 ↓ 22.6 3,279 13

Index Only Scan using folder_grp_map_pkey on folder_grp_map (cost=0.42..4.06 rows=145 width=16) (actual time=0.007..0.310 rows=3,279 loops=13)

  • Index Cond: (group_id = adm_grp_usr_map.group_id)
  • Heap Fetches: 0
Planning time : 0.620 ms
Execution time : 74.265 ms