explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 31BS

Settings
# exclusive inclusive rows x rows loops node
1. 2.506 3,594.191 ↑ 1,240.6 356 1

HashAggregate (cost=242,216.65..248,841.33 rows=441,645 width=2,035) (actual time=3,592.161..3,594.191 rows=356 loops=1)

  • Group Key: named_selections_summ_tbl.object_id, named_selections_summ_tbl.title, named_selections_summ_tbl.description, named_selections_summ_tbl.cube_id, named_selections_summ_tbl.dimension_name, named_selections_summ_tbl.object_type, named_selections_summ_tbl.scope, named_selections_summ_tbl.created_by, named_selections_summ_tbl.created, named_selections_summ_tbl.last_upd, named_selections_summ_tbl.last_upd_by, named_selections_summ_tbl.is_static_object, named_selections_summ_tbl.is_drillable, ofmt.filter_name, ft.favourite_id, cb.cube_name, (oum.is_editable)::character varying, ((max(obj_usergrp_map.is_editable) OVER (?)))::character varying, tm.tag_name, objcolmap.collection_id
2. 32.261 3,591.685 ↑ 1,240.6 356 1

Merge Right Join (cost=198,354.37..220,134.40 rows=441,645 width=2,035) (actual time=3,484.282..3,591.685 rows=356 loops=1)

  • Merge Cond: ((objcolmap.obj_id)::text = (named_selections_summ_tbl.object_id)::text)
3. 79.878 79.878 ↑ 1.0 159,652 1

Index Only Scan using inx_objcollmap_objid_collid on object_collection_map objcolmap (cost=0.42..5,829.02 rows=160,947 width=48) (actual time=0.020..79.878 rows=159,652 loops=1)

  • Heap Fetches: 159652
4. 0.128 3,479.546 ↑ 1,240.0 356 1

Materialize (cost=198,353.95..206,173.72 rows=441,442 width=2,029) (actual time=3,479.066..3,479.546 rows=356 loops=1)

5. 0.278 3,479.418 ↑ 1,240.0 356 1

Merge Left Join (cost=198,353.95..205,070.11 rows=441,442 width=2,029) (actual time=3,479.064..3,479.418 rows=356 loops=1)

  • Merge Cond: ((named_selections_summ_tbl.object_id)::text = (oum.object_id)::text)
6. 1.561 3,476.483 ↑ 52.3 356 1

Sort (cost=193,089.31..193,135.90 rows=18,634 width=1,997) (actual time=3,476.420..3,476.483 rows=356 loops=1)

  • Sort Key: named_selections_summ_tbl.object_id
  • Sort Method: quicksort Memory: 154kB
7. 18.856 3,474.922 ↑ 52.3 356 1

Hash Right Join (cost=188,207.83..191,767.63 rows=18,634 width=1,997) (actual time=3,462.514..3,474.922 rows=356 loops=1)

  • Hash Cond: ((obj_usergrp_map.object_id)::text = (named_selections_summ_tbl.object_id)::text)
8. 123.087 3,001.536 ↓ 1.3 164,302 1

HashAggregate (cost=152,762.02..154,047.15 rows=128,513 width=76) (actual time=2,959.381..3,001.536 rows=164,302 loops=1)

  • Group Key: max(obj_usergrp_map.is_editable) OVER (?), obj_usergrp_map.object_id
9. 167.016 2,878.449 ↑ 3.7 263,382 1

WindowAgg (cost=130,835.79..147,889.52 rows=974,499 width=76) (actual time=2,649.006..2,878.449 rows=263,382 loops=1)

10. 2,508.720 2,711.433 ↑ 3.7 263,382 1

Sort (cost=130,835.79..133,272.04 rows=974,499 width=46) (actual time=2,648.994..2,711.433 rows=263,382 loops=1)

  • Sort Key: obj_usergrp_map.object_id
  • Sort Method: quicksort Memory: 39431kB
11. 38.949 202.713 ↑ 3.7 263,382 1

Nested Loop (cost=540.94..33,900.91 rows=974,499 width=46) (actual time=0.075..202.713 rows=263,382 loops=1)

12. 0.021 0.068 ↑ 35.1 16 1

HashAggregate (cost=540.51..546.12 rows=561 width=8) (actual time=0.054..0.068 rows=16 loops=1)

  • Group Key: adm_grp_usr_map.group_id
13. 0.026 0.047 ↑ 40.8 16 1

Bitmap Heap Scan on adm_grp_usr_map (cost=8.77..538.88 rows=652 width=8) (actual time=0.027..0.047 rows=16 loops=1)

  • Recheck Cond: (lower((user_id)::text) = 'zicc232'::text)
  • Heap Blocks: exact=12
14. 0.021 0.021 ↑ 40.8 16 1

Bitmap Index Scan on grp_usr_map_usrid_grpid_i (cost=0.00..8.61 rows=652 width=0) (actual time=0.021..0.021 rows=16 loops=1)

  • Index Cond: (lower((user_id)::text) = 'zicc232'::text)
15. 163.696 163.696 ↓ 20.0 16,461 16

Index Scan using idx705 on obj_usergrp_map (cost=0.43..51.21 rows=825 width=54) (actual time=0.012..10.231 rows=16,461 loops=16)

  • Index Cond: (group_id = adm_grp_usr_map.group_id)
16. 0.140 454.530 ↓ 12.3 356 1

Hash (cost=35,445.45..35,445.45 rows=29 width=1,965) (actual time=454.530..454.530 rows=356 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
17. 55.746 454.390 ↓ 12.3 356 1

Nested Loop (cost=33,921.87..35,445.45 rows=29 width=1,965) (actual time=433.778..454.390 rows=356 loops=1)

  • Join Filter: (named_selections_summ_tbl.cube_id = (cb.cube_id)::numeric)
  • Rows Removed by Join Filter: 412248
18. 1.107 1.107 ↑ 1.0 1,159 1

Seq Scan on cube_tbl cb (cost=0.00..714.59 rows=1,159 width=31) (actual time=0.005..1.107 rows=1,159 loops=1)

19. 14.182 397.537 ↓ 71.2 356 1,159

Materialize (cost=33,921.87..34,629.46 rows=5 width=1,942) (actual time=0.323..0.343 rows=356 loops=1,159)

20. 0.157 383.355 ↓ 71.2 356 1

Nested Loop Left Join (cost=33,921.87..34,629.43 rows=5 width=1,942) (actual time=374.309..383.355 rows=356 loops=1)

21. 0.291 380.350 ↓ 71.2 356 1

Nested Loop Left Join (cost=33,921.45..34,626.53 rows=5 width=1,935) (actual time=374.283..380.350 rows=356 loops=1)

22. 2.666 374.363 ↓ 71.2 356 1

Hash Right Join (cost=33,920.90..34,614.42 rows=5 width=1,892) (actual time=374.234..374.363 rows=356 loops=1)

  • Hash Cond: ((tm.object_id)::text = (named_selections_summ_tbl.object_id)::text)
23. 2.413 2.413 ↑ 1.0 28,761 1

Seq Scan on tag_master tm (cost=0.00..585.61 rows=28,761 width=47) (actual time=0.010..2.413 rows=28,761 loops=1)

24. 0.136 369.284 ↓ 71.2 356 1

Hash (cost=33,920.84..33,920.84 rows=5 width=1,888) (actual time=369.284..369.284 rows=356 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
25. 0.222 369.148 ↓ 71.2 356 1

Hash Join (cost=33,780.11..33,920.84 rows=5 width=1,888) (actual time=368.265..369.148 rows=356 loops=1)

  • Hash Cond: ((named_selections_summ_tbl.object_id)::text = (fo.object_id)::text)
26. 5.324 368.282 ↑ 6.4 971 1

HashAggregate (cost=32,025.78..32,087.98 rows=6,220 width=2,352) (actual time=367.606..368.282 rows=971 loops=1)

  • Group Key: named_selections_summ_tbl.object_id, named_selections_summ_tbl.title, named_selections_summ_tbl.description, named_selections_summ_tbl.cube_id, named_selections_summ_tbl.dimension_name, named_selections_summ_tbl.object_type, named_selections_summ_tbl.scope, named_selections_summ_tbl.object_ref, named_selections_summ_tbl.status, named_selections_summ_tbl.created, named_selections_summ_tbl.created_by, named_selections_summ_tbl.last_upd, named_selections_summ_tbl.last_upd_by, named_selections_summ_tbl.object_definition, named_selections_summ_tbl.object_props, named_selections_summ_tbl.org_name, named_selections_summ_tbl.is_static_object, named_selections_summ_tbl.is_drillable, named_selections_summ_tbl.old_scope, named_selections_summ_tbl.old_created_by, named_selections_summ_tbl.last_accessed
27. 0.064 362.958 ↑ 6.4 974 1

Append (cost=0.43..31,699.23 rows=6,220 width=2,352) (actual time=6.661..362.958 rows=974 loops=1)

28. 36.228 36.228 ↑ 11.1 9 1

Index Scan using named_selections_summ_tbl_ind on named_selections_summ_tbl (cost=0.43..17,740.18 rows=100 width=1,092) (actual time=6.660..36.228 rows=9 loops=1)

  • Index Cond: ((object_type = '7'::numeric) AND (lower((org_name)::text) = 'gsk_ld'::text))
  • Filter: (lower((created_by)::text) = 'zicc232'::text)
  • Rows Removed by Filter: 20117
29. 0.958 0.958 ↑ 6.3 964 1

Index Scan using named_selections_summ_tbl_ind on named_selections_summ_tbl named_selections_summ_tbl_1 (cost=0.43..5,593.27 rows=6,112 width=1,092) (actual time=0.037..0.958 rows=964 loops=1)

  • Index Cond: ((object_type = '7'::numeric) AND (lower((org_name)::text) = 'gsk_ld'::text) AND (scope = ANY ('{1,3,5}'::numeric[])))
30. 17.454 325.708 ↑ 8.0 1 1

Hash Join (cost=7,992.68..8,272.48 rows=8 width=1,092) (actual time=305.899..325.708 rows=1 loops=1)

  • Hash Cond: ((obj_user_map.object_id)::text = (named_selections_summ_tbl_2.object_id)::text)
31. 114.987 307.273 ↓ 13.3 164,435 1

HashAggregate (cost=7,111.63..7,235.30 rows=12,367 width=118) (actual time=271.956..307.273 rows=164,435 loops=1)

  • Group Key: obj_user_map.object_id
32. 13.766 192.286 ↓ 21.3 263,682 1

Append (cost=54.37..7,080.71 rows=12,367 width=118) (actual time=0.060..192.286 rows=263,682 loops=1)

33. 0.370 0.415 ↑ 16.1 300 1

Bitmap Heap Scan on obj_user_map (cost=54.37..4,452.07 rows=4,831 width=45) (actual time=0.060..0.415 rows=300 loops=1)

  • Recheck Cond: (lower((user_id)::text) = 'zicc232'::text)
  • Heap Blocks: exact=159
34. 0.045 0.045 ↑ 15.8 306 1

Bitmap Index Scan on obj_user_map_user_id_lower (cost=0.00..53.16 rows=4,831 width=0) (actual time=0.045..0.045 rows=306 loops=1)

  • Index Cond: (lower((user_id)::text) = 'zicc232'::text)
35. 23.165 178.105 ↓ 34.9 263,382 1

Nested Loop (cost=0.84..2,443.14 rows=7,536 width=44) (actual time=0.054..178.105 rows=263,382 loops=1)

36. 0.060 0.060 ↓ 5.3 16 1

Index Only Scan using uk_usrgrp on adm_grp_usr_map adm_grp_usr_map_1 (cost=0.42..4.86 rows=3 width=8) (actual time=0.028..0.060 rows=16 loops=1)

  • Index Cond: (user_id = 'zicc232'::text)
  • Heap Fetches: 16
37. 154.880 154.880 ↓ 20.0 16,461 16

Index Scan using idx705 on obj_usergrp_map obj_usergrp_map_1 (cost=0.43..804.51 rows=825 width=52) (actual time=0.011..9.680 rows=16,461 loops=16)

  • Index Cond: (group_id = adm_grp_usr_map_1.group_id)
38. 0.522 0.981 ↑ 2.2 418 1

Hash (cost=869.34..869.34 rows=937 width=1,092) (actual time=0.981..0.981 rows=418 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 401kB
39. 0.459 0.459 ↑ 2.2 418 1

Index Scan using named_selections_summ_tbl_ind on named_selections_summ_tbl named_selections_summ_tbl_2 (cost=0.43..869.34 rows=937 width=1,092) (actual time=0.019..0.459 rows=418 loops=1)

  • Index Cond: ((object_type = '7'::numeric) AND (lower((org_name)::text) = 'gsk_ld'::text) AND (scope = '2'::numeric))
40. 0.095 0.644 ↑ 7.5 360 1

Hash (cost=1,720.76..1,720.76 rows=2,686 width=44) (actual time=0.644..0.644 rows=360 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 60kB
41. 0.549 0.549 ↑ 7.5 360 1

Index Scan using idx707 on folder_obj_map fo (cost=0.43..1,720.76 rows=2,686 width=44) (actual time=0.023..0.549 rows=360 loops=1)

  • Index Cond: (folder_id = ANY ('{531328,248731,10,276033,64192,563011,86656,424847,1193019,678070,1171957,1171958,1171959,1171960,1171961,1171962,1171963,1171964,1171965,47,1171966,988106,1171967,1256579,501759,275669,275668,698281,267853,1159964,316652,1159962,1159963,1159961,1159954,1159955,316643,1159952,1159953,276382,1159951,1159950,1159949,275633,275632,1161521,267735,504056,64191,58619,1004314,809918,424998}'::bigint[]))
42. 5.696 5.696 ↑ 1.0 1 356

Index Only Scan using "idx$$_6dbe60003" on obj_filter_map_tbl ofmt (cost=0.55..2.41 rows=1 width=87) (actual time=0.016..0.016 rows=1 loops=356)

  • Index Cond: (object_id = (named_selections_summ_tbl.object_id)::text)
  • Heap Fetches: 356
43. 2.848 2.848 ↓ 0.0 0 356

Index Scan using favourites_tbl_objid_usrid_i on favourites_tbl ft (cost=0.41..0.57 rows=1 width=45) (actual time=0.008..0.008 rows=0 loops=356)

  • Index Cond: (((named_selections_summ_tbl.object_id)::text = (object_id)::text) AND (lower((user_id)::text) = 'zicc232'::text))
44. 0.780 2.657 ↑ 28.0 169 1

Sort (cost=5,264.63..5,276.48 rows=4,739 width=77) (actual time=2.635..2.657 rows=169 loops=1)

  • Sort Key: oum.object_id
  • Sort Method: quicksort Memory: 43kB
45. 0.013 1.877 ↑ 28.0 169 1

Subquery Scan on oum (cost=4,880.53..4,975.31 rows=4,739 width=77) (actual time=1.817..1.877 rows=169 loops=1)

46. 0.141 1.864 ↑ 28.0 169 1

HashAggregate (cost=4,880.53..4,927.92 rows=4,739 width=85) (actual time=1.816..1.864 rows=169 loops=1)

  • Group Key: max(obj_user_map_1.is_editable) OVER (?), obj_user_map_1.object_id, obj_user_map_1.user_id
47. 0.154 1.723 ↑ 16.1 300 1

WindowAgg (cost=4,747.68..4,844.30 rows=4,831 width=85) (actual time=1.565..1.723 rows=300 loops=1)

48. 1.114 1.569 ↑ 16.1 300 1

Sort (cost=4,747.68..4,759.75 rows=4,831 width=55) (actual time=1.556..1.569 rows=300 loops=1)

  • Sort Key: obj_user_map_1.user_id, obj_user_map_1.object_id
  • Sort Method: quicksort Memory: 67kB
49. 0.409 0.455 ↑ 16.1 300 1

Bitmap Heap Scan on obj_user_map obj_user_map_1 (cost=54.37..4,452.07 rows=4,831 width=55) (actual time=0.065..0.455 rows=300 loops=1)

  • Recheck Cond: (lower((user_id)::text) = 'zicc232'::text)
  • Heap Blocks: exact=159
50. 0.046 0.046 ↑ 15.8 306 1

Bitmap Index Scan on obj_user_map_user_id_lower (cost=0.00..53.16 rows=4,831 width=0) (actual time=0.046..0.046 rows=306 loops=1)

  • Index Cond: (lower((user_id)::text) = 'zicc232'::text)
Planning time : 6.250 ms
Execution time : 3,602.743 ms