explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nScR

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 58,349.873 ↓ 3.7 74 1

Limit (cost=1,400,187.01..1,400,187.06 rows=20 width=1,105) (actual time=58,349.830..58,349.873 rows=74 loops=1)

  • Buffers: shared hit=2934579
2. 0.284 58,349.841 ↓ 3.7 74 1

Sort (cost=1,400,187.01..1,400,187.06 rows=20 width=1,105) (actual time=58,349.828..58,349.841 rows=74 loops=1)

  • Sort Key: ((project0.name)::character varying(255)) COLLATE "en_US
  • Sort Method: quicksort Memory: 37kB
  • Buffers: shared hit=2934579
3. 0.542 58,349.557 ↓ 3.7 74 1

Nested Loop Left Join (cost=0.00..1,400,186.58 rows=20 width=1,105) (actual time=963.729..58,349.557 rows=74 loops=1)

  • Join Filter: (project0.programid = program6.id)
  • Buffers: shared hit=2934579
4. 0.167 11,015.063 ↓ 3.7 74 1

Nested Loop (cost=0.00..382,662.08 rows=20 width=73) (actual time=317.984..11,015.063 rows=74 loops=1)

  • Join Filter: (project0.projectstatuslabelid = projectstatuslabel7.id)
  • Rows Removed by Join Filter: 3
  • Buffers: shared hit=558564
5. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on projectstatuslabel projectstatuslabel7 (cost=0.00..1.07 rows=1 width=16) (actual time=0.008..0.010 rows=1 loops=1)

  • Filter: (projectstatustype = 1)
  • Rows Removed by Filter: 5
  • Buffers: shared hit=1
6. 0.390 11,014.886 ↓ 1.9 77 1

Seq Scan on project project0 (cost=0.00..382,660.49 rows=41 width=89) (actual time=196.696..11,014.886 rows=77 loops=1)

  • Filter: ((programid = 'faf506b2-6d9a-439e-93a4-7c3e8f495f6a'::uuid) AND ((alternatives: SubPlan 4 or hashed SubPlan 6) OR (istimeentryallowed AND (alternatives: SubPlan 8 or hashed SubPlan 10))))
  • Rows Removed by Filter: 132
  • Buffers: shared hit=558563
7.          

SubPlan (forSeq Scan)

8. 11.726 11,014.496 ↑ 29.0 1 79

Nested Loop Semi Join (cost=73.39..50,876.07 rows=29 width=0) (actual time=139.424..139.424 rows=1 loops=79)

  • Buffers: shared hit=558557
9. 9.954 9.954 ↑ 2.1 120 79

Index Scan using ixtkprojectid on task task8 (cost=0.29..90.59 rows=254 width=4) (actual time=0.010..0.126 rows=120 loops=79)

  • Index Cond: (projectid = project0.id)
  • Filter: (istimeentryallowed AND (NOT isclosed) AND (timeentrystartdate <= '2018-11-30'::date) AND (timeentryenddate >= '2018-11-16'::date))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=799
10. 919.254 10,992.816 ↓ 0.0 0 9,444

Hash Join (cost=73.10..260.30 rows=3,712 width=4) (actual time=1.164..1.164 rows=0 loops=9,444)

  • Hash Cond: (projectteammember9.id = taskteammemberassignment10.projectteammemberid)
  • Buffers: shared hit=557758
11. 10,026.332 10,026.342 ↑ 9.8 379 9,441

Seq Scan on projectteammember projectteammember9 (cost=4.53..170.75 rows=3,712 width=16) (actual time=0.002..1.062 rows=379 loops=9,441)

  • Filter: ((userid = 965) OR (hashed SubPlan 3))
  • Rows Removed by Filter: 6984
  • Buffers: shared hit=515679
12.          

SubPlan (forSeq Scan)

13. 0.003 0.010 ↑ 1.5 2 1

Nested Loop (cost=0.42..4.52 rows=3 width=4) (actual time=0.008..0.010 rows=2 loops=1)

  • Buffers: shared hit=5
14. 0.004 0.004 ↑ 1.0 1 1

Index Scan using ixduuserid on departmentusers departmentusers12 (cost=0.28..2.29 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (userid = 965)
  • Buffers: shared hit=3
15. 0.003 0.003 ↑ 1.5 2 1

Index Scan using ixdfhchildid on departmentflathierarchy departmentflathierarchy11 (cost=0.14..2.19 rows=3 width=8) (actual time=0.002..0.003 rows=2 loops=1)

  • Index Cond: (childid = departmentusers12.departmentid)
  • Buffers: shared hit=2
16. 18.888 47.220 ↑ 241.5 2 9,444

Hash (cost=62.54..62.54 rows=483 width=20) (actual time=0.005..0.005 rows=2 loops=9,444)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=42079
17. 28.332 28.332 ↑ 241.5 2 9,444

Index Only Scan using uix2projectteammembertaskassignment on taskteammemberassignment taskteammemberassignment10 (cost=0.43..62.54 rows=483 width=20) (actual time=0.003..0.003 rows=2 loops=9,444)

  • Index Cond: (taskid = task8.id)
  • Heap Fetches: 14187
  • Buffers: shared hit=42079
18. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=86,104.89..87,819.59 rows=6,096 width=4) (never executed)

  • Hash Cond: (task8_1.id = taskteammemberassignment10_1.taskid)
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on task task8_1 (cost=0.00..1,456.55 rows=52,583 width=8) (never executed)

  • Filter: (istimeentryallowed AND (NOT isclosed) AND (timeentrystartdate <= '2018-11-30'::date) AND (timeentryenddate >= '2018-11-16'::date))
20. 0.000 0.000 ↓ 0.0 0

Hash (cost=86,026.58..86,026.58 rows=6,265 width=4) (never executed)

21. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=85,963.93..86,026.58 rows=6,265 width=4) (never executed)

  • Group Key: taskteammemberassignment10_1.taskid
22. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=217.15..82,177.41 rows=1,514,607 width=4) (never executed)

  • Hash Cond: (taskteammemberassignment10_1.projectteammemberid = projectteammember9_1.id)
23. 0.000 0.000 ↓ 0.0 0

Seq Scan on taskteammemberassignment taskteammemberassignment10_1 (cost=0.00..55,468.41 rows=3,025,541 width=20) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Hash (cost=170.75..170.75 rows=3,712 width=16) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on projectteammember projectteammember9_1 (cost=4.53..170.75 rows=3,712 width=16) (never executed)

  • Filter: ((userid = 965) OR (hashed SubPlan 5))
26.          

SubPlan (forSeq Scan)

27. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..4.52 rows=3 width=4) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Index Scan using ixduuserid on departmentusers departmentusers12_1 (cost=0.28..2.29 rows=1 width=4) (never executed)

  • Index Cond: (userid = 965)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using ixdfhchildid on departmentflathierarchy departmentflathierarchy11_1 (cost=0.14..2.19 rows=3 width=8) (never executed)

  • Index Cond: (childid = departmentusers12_1.departmentid)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using uix3ptm_projectrole on projectteammember projectteammember13 (cost=4.81..20.26 rows=18 width=0) (never executed)

  • Index Cond: (projectid = project0.id)
  • Filter: ((userid = 965) OR (hashed SubPlan 7))
31.          

SubPlan (forIndex Scan)

32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..4.52 rows=3 width=4) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Index Scan using ixduuserid on departmentusers departmentusers15 (cost=0.28..2.29 rows=1 width=4) (never executed)

  • Index Cond: (userid = 965)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using ixdfhchildid on departmentflathierarchy departmentflathierarchy14 (cost=0.14..2.19 rows=3 width=8) (never executed)

  • Index Cond: (childid = departmentusers15.departmentid)
35. 0.000 0.000 ↓ 0.0 0

Seq Scan on projectteammember projectteammember13_1 (cost=4.53..170.75 rows=3,712 width=4) (never executed)

  • Filter: ((userid = 965) OR (hashed SubPlan 9))
36.          

SubPlan (forSeq Scan)

37. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..4.52 rows=3 width=4) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Index Scan using ixduuserid on departmentusers departmentusers15_1 (cost=0.28..2.29 rows=1 width=4) (never executed)

  • Index Cond: (userid = 965)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using ixdfhchildid on departmentflathierarchy departmentflathierarchy14_1 (cost=0.14..2.19 rows=3 width=8) (never executed)

  • Index Cond: (childid = departmentusers15_1.departmentid)
40. 0.066 0.074 ↑ 1.0 1 74

Materialize (cost=0.00..1.14 rows=1 width=1,048) (actual time=0.001..0.001 rows=1 loops=74)

  • Buffers: shared hit=1
41. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on program program6 (cost=0.00..1.14 rows=1 width=1,048) (actual time=0.006..0.008 rows=1 loops=1)

  • Filter: (id = 'faf506b2-6d9a-439e-93a4-7c3e8f495f6a'::uuid)
  • Rows Removed by Filter: 10
  • Buffers: shared hit=1
42.          

SubPlan (forNested Loop Left Join)

43. 0.666 47,333.878 ↑ 1.0 1 74

Aggregate (cost=50,876.14..50,876.15 rows=1 width=0) (actual time=639.647..639.647 rows=1 loops=74)

  • Buffers: shared hit=2376014
44. 86.692 47,333.212 ↑ 1.9 15 74

Nested Loop Semi Join (cost=73.39..50,876.07 rows=29 width=0) (actual time=143.135..639.638 rows=15 loops=74)

  • Buffers: shared hit=2376014
45. 40.996 40.996 ↓ 2.2 553 74

Index Scan using ixtkprojectid on task task1 (cost=0.29..90.59 rows=254 width=4) (actual time=0.008..0.554 rows=553 loops=74)

  • Index Cond: (projectid = project0.id)
  • Filter: (istimeentryallowed AND (NOT isclosed) AND (timeentrystartdate <= '2018-11-30'::date) AND (timeentryenddate >= '2018-11-16'::date))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=3225
46. 3,952.248 47,205.524 ↓ 0.0 0 40,906

Hash Join (cost=73.10..260.30 rows=3,712 width=4) (actual time=1.154..1.154 rows=0 loops=40,906)

  • Hash Cond: (projectteammember2.id = taskteammemberassignment3.projectteammemberid)
  • Buffers: shared hit=2372789
47. 43,048.733 43,048.746 ↑ 9.9 376 40,882

Seq Scan on projectteammember projectteammember2 (cost=4.53..170.75 rows=3,712 width=16) (actual time=0.002..1.053 rows=376 loops=40,882)

  • Filter: ((userid = 965) OR (hashed SubPlan 1))
  • Rows Removed by Filter: 6869
  • Buffers: shared hit=2197374
48.          

SubPlan (forSeq Scan)

49. 0.005 0.013 ↑ 1.5 2 1

Nested Loop (cost=0.42..4.52 rows=3 width=4) (actual time=0.010..0.013 rows=2 loops=1)

  • Buffers: shared hit=5
50. 0.005 0.005 ↑ 1.0 1 1

Index Scan using ixduuserid on departmentusers departmentusers5 (cost=0.28..2.29 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (userid = 965)
  • Buffers: shared hit=3
51. 0.003 0.003 ↑ 1.5 2 1

Index Scan using ixdfhchildid on departmentflathierarchy departmentflathierarchy4 (cost=0.14..2.19 rows=3 width=8) (actual time=0.002..0.003 rows=2 loops=1)

  • Index Cond: (childid = departmentusers5.departmentid)
  • Buffers: shared hit=2
52. 81.812 204.530 ↑ 483.0 1 40,906

Hash (cost=62.54..62.54 rows=483 width=20) (actual time=0.005..0.005 rows=1 loops=40,906)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=175415
53. 122.718 122.718 ↑ 483.0 1 40,906

Index Only Scan using uix2projectteammembertaskassignment on taskteammemberassignment taskteammemberassignment3 (cost=0.43..62.54 rows=483 width=20) (actual time=0.003..0.003 rows=1 loops=40,906)

  • Index Cond: (taskid = task1.id)
  • Heap Fetches: 56923
  • Buffers: shared hit=175415