explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XQ6C

Settings
# exclusive inclusive rows x rows loops node
1. 162.483 191.592 ↓ 10.0 241 1

Seq Scan on folder_master fol (cost=832.06..42,268.97 rows=24 width=54) (actual time=0.087..191.592 rows=241 loops=1)

  • 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: 833,623
2.          

SubPlan (for Seq Scan)

3. 8.093 29.109 ↓ 21.1 26,953 1

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

  • Group Key: folder_user_map.folder_id
4. 1.753 21.016 ↓ 21.1 26,963 1

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

5. 0.043 0.157 ↑ 27.1 31 1

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

  • Group Key: folder_user_map.folder_id
6. 0.085 0.114 ↑ 6.1 139 1

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

  • Recheck Cond: ((user_id)::text = 'zicc232'::text)
  • Heap Blocks: exact=32
7. 0.029 0.029 ↑ 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.029..0.029 rows=139 loops=1)

  • Index Cond: ((user_id)::text = 'zicc232'::text)
8. 11.956 19.106 ↓ 61.8 26,932 1

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

  • Group Key: folder_grp_map.folder_id
9. 3.008 7.150 ↓ 97.8 42,633 1

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

10. 0.005 0.034 ↓ 4.3 13 1

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

11. 0.029 0.029 ↓ 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.018..0.029 rows=13 loops=1)

  • Index Cond: (user_id = 'zicc232'::text)
  • Heap Fetches: 3
12. 4.108 4.108 ↓ 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.316 rows=3,279 loops=13)

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