explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xxn

Settings
# exclusive inclusive rows x rows loops node
1. 86.934 3,920.119 ↑ 1.0 7,390 1

Hash Join (cost=67,014.65..1,510,829.51 rows=7,470 width=6,020) (actual time=2,401.69..3,920.119 rows=7,390 loops=1)

  • Buffers: shared hit=1,974,821
2. 11.060 2,690.058 ↑ 1.0 7,390 1

Hash Join (cost=65,796.19..155,601.42 rows=7,470 width=3,875) (actual time=2,361.155..2,690.058 rows=7,390 loops=1)

  • Buffers: shared hit=1,657,695
3. 11.599 2,678.256 ↑ 1.0 7,390 1

Hash Join (cost=64,252.52..154,018.54 rows=7,470 width=3,807) (actual time=2,360.4..2,678.256 rows=7,390 loops=1)

  • Buffers: shared hit=1,657,573
4. 20.445 2,664.751 ↑ 1.0 7,390 1

Nested Loop (cost=60,612.73..150,339.52 rows=7,470 width=3,784) (actual time=2,358.473..2,664.751 rows=7,390 loops=1)

  • Buffers: shared hit=1,657,254
5. 11.236 2,548.236 ↑ 1.0 7,390 1

Hash Join (cost=60,609.65..67,926.69 rows=7,470 width=3,800) (actual time=2,358.434..2,548.236 rows=7,390 loops=1)

  • Buffers: shared hit=1,624,347
6. 19.719 779.868 ↑ 1.0 7,390 1

Hash Join (cost=55,887.45..63,148.45 rows=7,470 width=3,767) (actual time=601.283..779.868 rows=7,390 loops=1)

  • Buffers: shared hit=26,954
7. 8.773 331.458 ↑ 1.0 7,390 1

Hash Join (cost=19,297.66..26,501.81 rows=7,470 width=2,126) (actual time=172.575..331.458 rows=7,390 loops=1)

  • Buffers: shared hit=16,877
8. 9.642 322.593 ↑ 1.0 7,390 1

Hash Join (cost=19,259.23..26,424.02 rows=7,470 width=2,090) (actual time=172.471..322.593 rows=7,390 loops=1)

  • Buffers: shared hit=16,861
9. 8.909 311.026 ↑ 1.0 7,390 1

Hash Join (cost=18,219.91..25,345.48 rows=7,470 width=2,035) (actual time=170.534..311.026 rows=7,390 loops=1)

  • Buffers: shared hit=16,673
10. 12.036 302.070 ↑ 1.0 7,390 1

Hash Join (cost=18,160.42..25,246.77 rows=7,470 width=2,058) (actual time=170.469..302.07 rows=7,390 loops=1)

  • Buffers: shared hit=16,665
11. 8.083 259.381 ↑ 1.0 7,390 1

Hash Join (cost=11,437.1..18,484.23 rows=7,470 width=1,879) (actual time=139.795..259.381 rows=7,390 loops=1)

  • Buffers: shared hit=10,880
12. 8.393 251.139 ↑ 1.0 7,390 1

Hash Join (cost=11,170.56..18,178.47 rows=7,470 width=1,846) (actual time=139.626..251.139 rows=7,390 loops=1)

  • Buffers: shared hit=10,854
13. 8.706 242.687 ↑ 1.0 7,390 1

Hash Join (cost=11,146.83..18,115.52 rows=7,470 width=1,823) (actual time=139.556..242.687 rows=7,390 loops=1)

  • Buffers: shared hit=10,841
14. 10.198 191.639 ↑ 1.0 7,390 1

Hash Join (cost=6,645.53..13,575.01 rows=7,470 width=1,759) (actual time=97.203..191.639 rows=7,390 loops=1)

  • Buffers: shared hit=8,530
15. 9.653 107.466 ↑ 1.0 7,390 1

Hash Join (cost=1,753.09..8,643.36 rows=7,470 width=1,695) (actual time=23.211..107.466 rows=7,390 loops=1)

  • Buffers: shared hit=6,219
16. 7.843 76.927 ↑ 1.0 7,390 1

Hash Join (cost=1,189.44..8,040.49 rows=7,470 width=1,599) (actual time=2.311..76.927 rows=7,390 loops=1)

  • Buffers: shared hit=6,012
17. 8.095 68.993 ↑ 1.0 7,390 1

Hash Join (cost=1,151.02..7,962.7 rows=7,470 width=1,563) (actual time=2.211..68.993 rows=7,390 loops=1)

  • Buffers: shared hit=5,996
18. 8.878 58.882 ↑ 1.0 7,390 1

Hash Join (cost=111.7..6,884.16 rows=7,470 width=1,508) (actual time=0.186..58.882 rows=7,390 loops=1)

  • Buffers: shared hit=5,808
19. 10.287 49.905 ↑ 1.0 7,390 1

Hash Join (cost=59.77..6,792.98 rows=7,470 width=1,474) (actual time=0.078..49.905 rows=7,390 loops=1)

  • Buffers: shared hit=5,796
20. 6.141 39.577 ↑ 1.0 7,390 1

Nested Loop (cost=0.28..6,694.27 rows=7,470 width=1,453) (actual time=0.027..39.577 rows=7,390 loops=1)

  • Buffers: shared hit=5,788
21. 0.017 0.017 ↑ 1.0 1 1

Index Scan using company_pk on company company (cost=0.28..8.3 rows=1 width=33) (actual time=0.016..0.017 rows=1 loops=1)

  • Index Cond: ((company.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Filter: (NOT company.is_deleted)
  • Buffers: shared hit=3
22. 33.419 33.419 ↑ 1.0 7,390 1

Seq Scan on schedule_item si (cost=0..6,611.27 rows=7,470 width=1,453) (actual time=0.008..33.419 rows=7,390 loops=1)

  • Filter: ((NOT si.is_deleted) AND ((si.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text))
  • Buffers: shared hit=5,785
23. 0.011 0.041 ↑ 1.1 14 1

Hash (cost=59.27..59.27 rows=15 width=87) (actual time=0.041..0.041 rows=14 loops=1)

  • Buffers: shared hit=8
24. 0.015 0.030 ↑ 1.1 14 1

Bitmap Heap Scan on tracking_description td (cost=4.53..59.27 rows=15 width=87) (actual time=0.019..0.03 rows=14 loops=1)

  • Filter: (NOT td.is_deleted)
  • Heap Blocks: exact=5
  • Buffers: shared hit=8
25. 0.015 0.015 ↑ 1.1 14 1

Bitmap Index Scan on tracking_description_ix1 (cost=0..4.53 rows=15 width=0) (actual time=0.014..0.015 rows=14 loops=1)

  • Index Cond: ((td.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=3
26. 0.036 0.099 ↑ 1.1 69 1

Hash (cost=50.75..50.75 rows=78 width=100) (actual time=0.099..0.099 rows=69 loops=1)

  • Buffers: shared hit=12
27. 0.049 0.063 ↑ 1.1 69 1

Bitmap Heap Scan on activity a (cost=4.88..50.75 rows=78 width=100) (actual time=0.018..0.063 rows=69 loops=1)

  • Filter: (NOT a.is_deleted)
  • Heap Blocks: exact=10
  • Buffers: shared hit=12
28. 0.014 0.014 ↑ 1.1 69 1

Bitmap Index Scan on activity_ix1 (cost=0..4.86 rows=78 width=0) (actual time=0.013..0.014 rows=69 loops=1)

  • Index Cond: ((a.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=2
29. 0.704 2.016 ↑ 1.0 1,502 1

Hash (cost=1,016.37..1,016.37 rows=1,530 width=121) (actual time=2.016..2.016 rows=1,502 loops=1)

  • Buffers: shared hit=188
30. 1.198 1.312 ↑ 1.0 1,502 1

Bitmap Heap Scan on engagement e (cost=64.15..1,016.37 rows=1,530 width=121) (actual time=0.133..1.312 rows=1,502 loops=1)

  • Filter: (NOT e.is_deleted)
  • Heap Blocks: exact=176
  • Buffers: shared hit=188
31. 0.114 0.114 ↑ 1.0 1,512 1

Bitmap Index Scan on "ix_engagement$company_id" (cost=0..63.77 rows=1,531 width=0) (actual time=0.114..0.114 rows=1,512 loops=1)

  • Index Cond: ((e.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
32. 0.028 0.091 ↑ 1.2 53 1

Hash (cost=37.51..37.51 rows=61 width=102) (actual time=0.091..0.091 rows=53 loops=1)

  • Buffers: shared hit=16
33. 0.048 0.063 ↑ 1.2 53 1

Bitmap Heap Scan on engagement_template et (cost=4.75..37.51 rows=61 width=102) (actual time=0.02..0.063 rows=53 loops=1)

  • Filter: (NOT et.is_deleted)
  • Heap Blocks: exact=13
  • Buffers: shared hit=16
34. 0.015 0.015 ↑ 1.2 53 1

Bitmap Index Scan on engagement_template_ix1 (cost=0..4.73 rows=61 width=0) (actual time=0.014..0.015 rows=53 loops=1)

  • Index Cond: ((et.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=3
35. 1.156 20.886 ↑ 1.0 2,479 1

Hash (cost=525.34..525.34 rows=2,554 width=162) (actual time=20.886..20.886 rows=2,479 loops=1)

  • Buffers: shared hit=207
36. 1.132 19.730 ↑ 1.0 2,479 1

Subquery Scan on sid (cost=416.8..525.34 rows=2,554 width=162) (actual time=8.49..19.73 rows=2,479 loops=1)

  • Buffers: shared hit=207
37. 9.474 18.598 ↑ 1.0 2,479 1

GroupAggregate (cost=416.8..499.8 rows=2,554 width=162) (actual time=8.489..18.598 rows=2,479 loops=1)

  • Group Key: sid_1.company_id, sid_1.schedule_item_id
  • Buffers: shared hit=207
38. 6.266 9.124 ↑ 1.0 2,479 1

Sort (cost=416.8..423.18 rows=2,554 width=134) (actual time=8.467..9.124 rows=2,479 loops=1)

  • Sort Key: sid_1.schedule_item_id
  • Sort Method: quicksort Memory: 755kB
  • Buffers: shared hit=207
39. 1.555 2.858 ↑ 1.0 2,479 1

Hash Join (cost=3.12..272.26 rows=2,554 width=134) (actual time=0.245..2.858 rows=2,479 loops=1)

  • Buffers: shared hit=207
40. 1.250 1.250 ↑ 1.0 2,479 1

Seq Scan on schedule_item_department sid_1 (cost=0..261.86 rows=2,554 width=99) (actual time=0.185..1.25 rows=2,479 loops=1)

  • Filter: ((sid_1.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=205
41. 0.026 0.053 ↓ 1.1 54 1

Hash (cost=2.5..2.5 rows=50 width=68) (actual time=0.053..0.053 rows=54 loops=1)

  • Buffers: shared hit=2
42. 0.027 0.027 ↓ 1.1 54 1

Seq Scan on department d (cost=0..2.5 rows=50 width=68) (actual time=0.005..0.027 rows=54 loops=1)

  • Buffers: shared hit=2
43. 2.304 73.975 ↓ 1.2 4,664 1

Hash (cost=4,831.87..4,831.87 rows=4,038 width=130) (actual time=73.975..73.975 rows=4,664 loops=1)

  • Buffers: shared hit=2,311
44. 2.046 71.671 ↓ 1.2 4,664 1

Subquery Scan on siap (cost=4,679.68..4,831.87 rows=4,038 width=130) (actual time=55.174..71.671 rows=4,664 loops=1)

  • Buffers: shared hit=2,311
45. 13.142 69.625 ↓ 1.2 4,664 1

GroupAggregate (cost=4,679.68..4,791.49 rows=4,038 width=130) (actual time=55.173..69.625 rows=4,664 loops=1)

  • Group Key: sia.company_id, sia.schedule_item_id
  • Buffers: shared hit=2,311
46. 12.932 56.483 ↓ 1.1 4,664 1

Sort (cost=4,679.68..4,689.93 rows=4,099 width=130) (actual time=55.147..56.483 rows=4,664 loops=1)

  • Sort Key: sia.schedule_item_id
  • Sort Method: quicksort Memory: 1,431kB
  • Buffers: shared hit=2,311
47. 2.865 43.551 ↓ 1.1 4,664 1

Hash Join (cost=2,780.11..4,433.72 rows=4,099 width=130) (actual time=37.571..43.551 rows=4,664 loops=1)

  • Buffers: shared hit=2,311
48. 3.279 3.686 ↓ 1.1 4,664 1

Bitmap Heap Scan on schedule_item_assignment sia (cost=229.95..1,872.8 rows=4,099 width=99) (actual time=0.488..3.686 rows=4,664 loops=1)

  • Filter: ((NOT sia.is_deleted) AND (NOT sia.is_secondary))
  • Heap Blocks: exact=744
  • Buffers: shared hit=787
49. 0.407 0.407 ↓ 1.0 4,883 1

Bitmap Index Scan on "ix_schedule_item_assignment$company_id" (cost=0..228.92 rows=4,868 width=0) (actual time=0.407..0.407 rows=4,883 loops=1)

  • Index Cond: ((sia.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=43
50. 19.449 37.000 ↑ 1.0 45,121 1

Hash (cost=1,980.07..1,980.07 rows=45,607 width=64) (actual time=36.999..37 rows=45,121 loops=1)

  • Buffers: shared hit=1,524
51. 17.551 17.551 ↑ 1.0 45,121 1

Seq Scan on employee e_1 (cost=0..1,980.07 rows=45,607 width=64) (actual time=0.008..17.551 rows=45,121 loops=1)

  • Buffers: shared hit=1,524
52. 0.109 42.342 ↑ 3.6 215 1

Hash (cost=4,489.79..4,489.79 rows=767 width=130) (actual time=42.342..42.342 rows=215 loops=1)

  • Buffers: shared hit=2,311
53. 0.100 42.233 ↑ 3.6 215 1

Subquery Scan on sias (cost=4,461..4,489.79 rows=767 width=130) (actual time=41.482..42.233 rows=215 loops=1)

  • Buffers: shared hit=2,311
54. 0.625 42.133 ↑ 3.6 215 1

GroupAggregate (cost=4,461..4,482.12 rows=767 width=130) (actual time=41.48..42.133 rows=215 loops=1)

  • Group Key: sia_1.company_id, sia_1.schedule_item_id
  • Buffers: shared hit=2,311
55. 0.414 41.508 ↑ 3.6 215 1

Sort (cost=4,461..4,462.93 rows=769 width=130) (actual time=41.454..41.508 rows=215 loops=1)

  • Sort Key: sia_1.schedule_item_id
  • Sort Method: quicksort Memory: 82kB
  • Buffers: shared hit=2,311
56. 0.240 41.094 ↑ 3.6 215 1

Hash Join (cost=2,779.27..4,424.14 rows=769 width=130) (actual time=38.813..41.094 rows=215 loops=1)

  • Buffers: shared hit=2,311
57. 2.324 2.735 ↑ 3.6 215 1

Bitmap Heap Scan on schedule_item_assignment sia_1 (cost=229.12..1,871.97 rows=769 width=99) (actual time=0.588..2.735 rows=215 loops=1)

  • Filter: ((NOT sia_1.is_deleted) AND sia_1.is_secondary)
  • Heap Blocks: exact=744
  • Buffers: shared hit=787
58. 0.411 0.411 ↓ 1.0 4,883 1

Bitmap Index Scan on "ix_schedule_item_assignment$company_id" (cost=0..228.92 rows=4,868 width=0) (actual time=0.41..0.411 rows=4,883 loops=1)

  • Index Cond: ((sia_1.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=43
59. 20.329 38.119 ↑ 1.0 45,121 1

Hash (cost=1,980.07..1,980.07 rows=45,607 width=64) (actual time=38.118..38.119 rows=45,121 loops=1)

  • Buffers: shared hit=1,524
60. 17.790 17.790 ↑ 1.0 45,121 1

Seq Scan on employee e_2 (cost=0..1,980.07 rows=45,607 width=64) (actual time=0.008..17.79 rows=45,121 loops=1)

  • Buffers: shared hit=1,524
61. 0.015 0.059 ↓ 5.0 25 1

Hash (cost=23.66..23.66 rows=5 width=89) (actual time=0.059..0.059 rows=25 loops=1)

  • Buffers: shared hit=13
62. 0.024 0.044 ↓ 5.0 25 1

Bitmap Heap Scan on employee re (cost=4.45..23.66 rows=5 width=89) (actual time=0.026..0.044 rows=25 loops=1)

  • Filter: (NOT re.is_deleted)
  • Heap Blocks: exact=9
  • Buffers: shared hit=13
63. 0.020 0.020 ↓ 5.0 25 1

Bitmap Index Scan on "ux_employee$company_id$employee_id" (cost=0..4.45 rows=5 width=0) (actual time=0.02..0.02 rows=25 loops=1)

  • Index Cond: ((re.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=4
64. 0.055 0.159 ↑ 1.0 103 1

Hash (cost=264.96..264.96 rows=105 width=99) (actual time=0.159..0.159 rows=103 loops=1)

  • Buffers: shared hit=26
65. 0.085 0.104 ↑ 1.0 103 1

Bitmap Heap Scan on project_template pt (cost=5.1..264.96 rows=105 width=99) (actual time=0.025..0.104 rows=103 loops=1)

  • Filter: (NOT pt.is_deleted)
  • Heap Blocks: exact=24
  • Buffers: shared hit=26
66. 0.019 0.019 ↓ 1.0 109 1

Bitmap Index Scan on project_template_ix1 (cost=0..5.07 rows=105 width=0) (actual time=0.018..0.019 rows=109 loops=1)

  • Index Cond: ((pt.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=2
67. 4.496 30.653 ↑ 1.0 7,390 1

Hash (cost=6,611.27..6,611.27 rows=7,470 width=212) (actual time=30.653..30.653 rows=7,390 loops=1)

  • Buffers: shared hit=5,785
68. 26.157 26.157 ↑ 1.0 7,390 1

Seq Scan on schedule_item task_project (cost=0..6,611.27 rows=7,470 width=212) (actual time=0.011..26.157 rows=7,390 loops=1)

  • Filter: ((NOT task_project.is_deleted) AND ((task_project.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text))
  • Buffers: shared hit=5,785
69. 0.009 0.047 ↑ 1.1 14 1

Hash (cost=59.27..59.27 rows=15 width=76) (actual time=0.047..0.047 rows=14 loops=1)

  • Buffers: shared hit=8
70. 0.018 0.038 ↑ 1.1 14 1

Bitmap Heap Scan on tracking_description tptd (cost=4.53..59.27 rows=15 width=76) (actual time=0.027..0.038 rows=14 loops=1)

  • Filter: (NOT tptd.is_deleted)
  • Heap Blocks: exact=5
  • Buffers: shared hit=8
71. 0.020 0.020 ↑ 1.1 14 1

Bitmap Index Scan on tracking_description_ix1 (cost=0..4.53 rows=15 width=0) (actual time=0.019..0.02 rows=14 loops=1)

  • Index Cond: ((tptd.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=3
72. 0.682 1.925 ↑ 1.0 1,502 1

Hash (cost=1,016.37..1,016.37 rows=1,530 width=121) (actual time=1.925..1.925 rows=1,502 loops=1)

  • Buffers: shared hit=188
73. 1.129 1.243 ↑ 1.0 1,502 1

Bitmap Heap Scan on engagement tpe (cost=64.15..1,016.37 rows=1,530 width=121) (actual time=0.135..1.243 rows=1,502 loops=1)

  • Filter: (NOT tpe.is_deleted)
  • Heap Blocks: exact=176
  • Buffers: shared hit=188
74. 0.114 0.114 ↑ 1.0 1,512 1

Bitmap Index Scan on "ix_engagement$company_id" (cost=0..63.77 rows=1,531 width=0) (actual time=0.114..0.114 rows=1,512 loops=1)

  • Index Cond: ((tpe.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
75. 0.029 0.092 ↑ 1.2 53 1

Hash (cost=37.51..37.51 rows=61 width=102) (actual time=0.092..0.092 rows=53 loops=1)

  • Buffers: shared hit=16
76. 0.050 0.063 ↑ 1.2 53 1

Bitmap Heap Scan on engagement_template tpet (cost=4.75..37.51 rows=61 width=102) (actual time=0.02..0.063 rows=53 loops=1)

  • Filter: (NOT tpet.is_deleted)
  • Heap Blocks: exact=13
  • Buffers: shared hit=16
77. 0.013 0.013 ↑ 1.2 53 1

Bitmap Index Scan on engagement_template_ix1 (cost=0..4.73 rows=61 width=0) (actual time=0.013..0.013 rows=53 loops=1)

  • Index Cond: ((tpet.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=3
78. 2.049 428.691 ↑ 1.1 858 1

Hash (cost=36,575.89..36,575.89 rows=927 width=1,707) (actual time=428.691..428.691 rows=858 loops=1)

  • Buffers: shared hit=10,077
79. 1.176 426.642 ↑ 1.1 858 1

Hash Join (cost=20,183.44..36,575.89 rows=927 width=1,707) (actual time=22.546..426.642 rows=858 loops=1)

  • Buffers: shared hit=10,077
80. 212.246 425.420 ↑ 1.1 858 1

Nested Loop (cost=20,159.71..36,547.29 rows=927 width=1,684) (actual time=22.486..425.42 rows=858 loops=1)

  • Buffers: shared hit=10,064
81. 0.893 45.006 ↑ 1.1 858 1

Hash Join (cost=19,454.04..34,832.91 rows=927 width=1,651) (actual time=12.493..45.006 rows=858 loops=1)

  • Buffers: shared hit=6,646
82. 0.987 44.073 ↑ 1.1 858 1

Hash Join (cost=19,430.31..34,804.31 rows=927 width=1,628) (actual time=12.443..44.073 rows=858 loops=1)

  • Buffers: shared hit=6,633
83. 1.039 43.028 ↑ 1.1 858 1

Hash Join (cost=19,406.57..34,775.71 rows=927 width=1,605) (actual time=12.374..43.028 rows=858 loops=1)

  • Buffers: shared hit=6,620
84. 1.133 40.360 ↑ 1.1 858 1

Hash Join (cost=15,766.78..31,131.05 rows=927 width=1,621) (actual time=10.732..40.36 rows=858 loops=1)

  • Buffers: shared hit=6,301
85. 1.884 39.181 ↑ 1.1 858 1

Hash Join (cost=15,762.35..31,121.76 rows=927 width=1,581) (actual time=10.675..39.181 rows=858 loops=1)

  • Buffers: shared hit=6,298
86. 0.995 33.023 ↑ 1.1 1,309 1

Nested Loop (cost=11,805.33..27,154.28 rows=1,387 width=1,111) (actual time=6.388..33.023 rows=1,309 loops=1)

  • Buffers: shared hit=5,910
87. 0.012 0.012 ↑ 1.0 1 1

Index Scan using company_pk on company company_2 (cost=0.28..8.3 rows=1 width=33) (actual time=0.01..0.012 rows=1 loops=1)

  • Index Cond: ((company_2.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Filter: (NOT company_2.is_deleted)
  • Buffers: shared hit=3
88. 1.461 32.016 ↑ 1.1 1,309 1

Hash Join (cost=11,805.05..27,132.11 rows=1,387 width=1,111) (actual time=6.37..32.016 rows=1,309 loops=1)

  • Buffers: shared hit=5,907
89. 1.556 30.074 ↑ 1.1 1,309 1

Hash Join (cost=10,586.59..25,906.37 rows=1,387 width=1,049) (actual time=5.878..30.074 rows=1,309 loops=1)

  • Buffers: shared hit=5,819
90. 1.835 27.812 ↑ 1.1 1,309 1

Hash Join (cost=9,042.92..24,355.41 rows=1,387 width=981) (actual time=5.162..27.812 rows=1,309 loops=1)

  • Buffers: shared hit=5,697
91. 1.694 24.155 ↑ 1.1 1,309 1

Hash Join (cost=6,486.3..21,791.51 rows=1,387 width=321) (actual time=3.329..24.155 rows=1,309 loops=1)

  • Buffers: shared hit=5,390
92. 1.756 20.905 ↑ 1.1 1,309 1

Hash Join (cost=3,061.45..18,356.17 rows=1,387 width=310) (actual time=1.762..20.905 rows=1,309 loops=1)

  • Buffers: shared hit=5,109
93. 3.050 17.592 ↑ 1.1 1,309 1

Bitmap Heap Scan on contact c_1 (cost=55.17..15,342.61 rows=1,387 width=292) (actual time=0.194..17.592 rows=1,309 loops=1)

  • Filter: (NOT c_1.is_deleted)
  • Heap Blocks: exact=302
  • Buffers: shared hit=4,851
94. 0.143 0.143 ↑ 1.1 1,309 1

Bitmap Index Scan on contact_ix1 (cost=0..54.82 rows=1,387 width=0) (actual time=0.143..0.143 rows=1,309 loops=1)

  • Index Cond: ((c_1.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=17
95.          

SubPlan (for Bitmap Heap Scan)

96. 2.618 14.399 ↓ 0.0 0 1,309

GroupAggregate (cost=0.42..8.45 rows=1 width=65) (actual time=0.011..0.011 rows=0 loops=1,309)

  • Group Key: ni.contact_id
  • Buffers: shared hit=4,532
97. 11.781 11.781 ↓ 0.0 0 1,309

Index Scan using national_identity_uk1 on national_identity ni (cost=0.42..8.44 rows=1 width=44) (actual time=0.009..0.009 rows=0 loops=1,309)

  • Index Cond: ((ni.contact_id)::text = (c_1.contact_id)::text)
  • Buffers: shared hit=4,532
98. 0.523 1.557 ↓ 1.1 1,309 1

Hash (cost=2,988.67..2,988.67 rows=1,174 width=84) (actual time=1.557..1.557 rows=1,309 loops=1)

  • Buffers: shared hit=258
99. 0.922 1.034 ↓ 1.1 1,309 1

Bitmap Heap Scan on contact_image ci (cost=45.52..2,988.67 rows=1,174 width=84) (actual time=0.138..1.034 rows=1,309 loops=1)

  • Heap Blocks: exact=246
  • Buffers: shared hit=258
100. 0.112 0.112 ↓ 1.1 1,338 1

Bitmap Index Scan on "ix_contact_image$company_id" (cost=0..45.23 rows=1,174 width=0) (actual time=0.112..0.112 rows=1,338 loops=1)

  • Index Cond: ((ci.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
101. 0.517 1.556 ↑ 1.1 1,309 1

Hash (cost=3,403.9..3,403.9 rows=1,396 width=77) (actual time=1.556..1.556 rows=1,309 loops=1)

  • Buffers: shared hit=281
102. 0.915 1.039 ↑ 1.1 1,309 1

Bitmap Heap Scan on contact_data cd (cost=55.24..3,403.9 rows=1,396 width=77) (actual time=0.154..1.039 rows=1,309 loops=1)

  • Filter: ((cd.data_type_id)::text = 'UNKNOWN'::text)
  • Heap Blocks: exact=268
  • Buffers: shared hit=281
103. 0.124 0.124 ↑ 1.0 1,349 1

Bitmap Index Scan on "ix_contact_data$company_id" (cost=0..54.89 rows=1,396 width=0) (actual time=0.124..0.124 rows=1,349 loops=1)

  • Index Cond: ((cd.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=13
104. 0.636 1.822 ↓ 1.1 1,100 1

Hash (cost=2,541.4..2,541.4 rows=1,015 width=726) (actual time=1.822..1.822 rows=1,100 loops=1)

  • Buffers: shared hit=307
105. 1.070 1.186 ↓ 1.1 1,100 1

Bitmap Heap Scan on contact_address pca (cost=40.49..2,541.4 rows=1,015 width=726) (actual time=0.147..1.186 rows=1,100 loops=1)

  • Filter: ((NOT pca.is_deleted) AND pca.is_primary)
  • Heap Blocks: exact=295
  • Buffers: shared hit=307
106. 0.116 0.116 ↓ 1.1 1,185 1

Bitmap Index Scan on "ix_contact_address$company_id" (cost=0..40.24 rows=1,043 width=0) (actual time=0.115..0.116 rows=1,185 loops=1)

  • Index Cond: ((pca.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
107. 0.264 0.706 ↑ 1.0 539 1

Hash (cost=1,535.38..1,535.38 rows=553 width=134) (actual time=0.705..0.706 rows=539 loops=1)

  • Buffers: shared hit=122
108. 0.382 0.442 ↑ 1.0 539 1

Bitmap Heap Scan on contact_email pce (cost=20.72..1,535.38 rows=553 width=134) (actual time=0.075..0.442 rows=539 loops=1)

  • Filter: ((NOT pce.is_deleted) AND pce.is_primary)
  • Heap Blocks: exact=115
  • Buffers: shared hit=122
109. 0.060 0.060 ↓ 1.1 592 1

Bitmap Index Scan on "ix_contact_email$company_id" (cost=0..20.58 rows=555 width=0) (actual time=0.06..0.06 rows=592 loops=1)

  • Index Cond: ((pce.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=7
110. 0.151 0.481 ↑ 1.0 321 1

Hash (cost=1,213.49..1,213.49 rows=331 width=128) (actual time=0.481..0.481 rows=321 loops=1)

  • Buffers: shared hit=88
111. 0.279 0.330 ↑ 1.0 321 1

Bitmap Heap Scan on contact_phone pcp (cost=19.72..1,213.49 rows=331 width=128) (actual time=0.061..0.33 rows=321 loops=1)

  • Filter: ((NOT pcp.is_deleted) AND pcp.is_primary)
  • Heap Blocks: exact=81
  • Buffers: shared hit=88
112. 0.051 0.051 ↓ 1.2 504 1

Bitmap Index Scan on "ix_contact_phone$company_id" (cost=0..19.64 rows=429 width=0) (actual time=0.05..0.051 rows=504 loops=1)

  • Index Cond: ((pcp.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=7
113. 0.705 4.274 ↑ 1.1 858 1

Hash (cost=3,943.12..3,943.12 rows=927 width=536) (actual time=4.273..4.274 rows=858 loops=1)

  • Buffers: shared hit=388
114. 0.493 3.569 ↑ 1.1 858 1

Nested Loop (cost=1,941.41..3,943.12 rows=927 width=536) (actual time=1.587..3.569 rows=858 loops=1)

  • Buffers: shared hit=388
115. 0.014 0.014 ↑ 1.0 1 1

Index Scan using company_pk on company company_1 (cost=0.28..8.3 rows=1 width=33) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: ((company_1.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Filter: (NOT company_1.is_deleted)
  • Buffers: shared hit=3
116. 0.900 3.062 ↑ 1.1 858 1

Hash Join (cost=1,941.13..3,925.55 rows=927 width=536) (actual time=1.565..3.062 rows=858 loops=1)

  • Buffers: shared hit=385
117. 0.626 0.716 ↑ 1.1 858 1

Bitmap Heap Scan on client c (cost=35.6..2,015.15 rows=927 width=148) (actual time=0.107..0.716 rows=858 loops=1)

  • Filter: (NOT c.is_deleted)
  • Heap Blocks: exact=173
  • Buffers: shared hit=185
118. 0.090 0.090 ↓ 1.1 1,044 1

Bitmap Index Scan on client_ix1 (cost=0..35.37 rows=927 width=0) (actual time=0.089..0.09 rows=1,044 loops=1)

  • Index Cond: ((c.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
119. 0.590 1.446 ↑ 1.1 858 1

Hash (cost=1,891.77..1,891.77 rows=917 width=454) (actual time=1.445..1.446 rows=858 loops=1)

  • Buffers: shared hit=200
120. 0.766 0.856 ↑ 1.1 858 1

Bitmap Heap Scan on client_main cm (cost=39.52..1,891.77 rows=917 width=454) (actual time=0.11..0.856 rows=858 loops=1)

  • Heap Blocks: exact=189
  • Buffers: shared hit=200
121. 0.090 0.090 ↓ 1.2 1,131 1

Bitmap Index Scan on "ix_client_main$company_id" (cost=0..39.29 rows=917 width=0) (actual time=0.09..0.09 rows=1,131 loops=1)

  • Index Cond: ((cm.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=11
122. 0.010 0.046 ↑ 1.0 16 1

Hash (cost=4.19..4.19 rows=16 width=106) (actual time=0.045..0.046 rows=16 loops=1)

  • Buffers: shared hit=3
123. 0.036 0.036 ↑ 1.0 16 1

Seq Scan on office co (cost=0..4.19 rows=16 width=106) (actual time=0.024..0.036 rows=16 loops=1)

  • Filter: ((NOT co.is_deleted) AND ((co.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text))
  • Buffers: shared hit=3
124. 0.589 1.629 ↑ 1.1 1,309 1

Hash (cost=3,618.99..3,618.99 rows=1,387 width=83) (actual time=1.628..1.629 rows=1,309 loops=1)

  • Buffers: shared hit=319
125. 0.934 1.040 ↑ 1.1 1,309 1

Bitmap Heap Scan on contact coc (cost=55.17..3,618.99 rows=1,387 width=83) (actual time=0.137..1.04 rows=1,309 loops=1)

  • Filter: (NOT coc.is_deleted)
  • Heap Blocks: exact=302
  • Buffers: shared hit=319
126. 0.106 0.106 ↑ 1.1 1,309 1

Bitmap Index Scan on contact_ix1 (cost=0..54.82 rows=1,387 width=0) (actual time=0.105..0.106 rows=1,309 loops=1)

  • Index Cond: ((coc.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=17
127. 0.016 0.058 ↓ 5.0 25 1

Hash (cost=23.66..23.66 rows=5 width=89) (actual time=0.057..0.058 rows=25 loops=1)

  • Buffers: shared hit=13
128. 0.027 0.042 ↓ 5.0 25 1

Bitmap Heap Scan on employee cme (cost=4.45..23.66 rows=5 width=89) (actual time=0.02..0.042 rows=25 loops=1)

  • Filter: (NOT cme.is_deleted)
  • Heap Blocks: exact=9
  • Buffers: shared hit=13
129. 0.015 0.015 ↓ 5.0 25 1

Bitmap Index Scan on "ux_employee$company_id$employee_id" (cost=0..4.45 rows=5 width=0) (actual time=0.015..0.015 rows=25 loops=1)

  • Index Cond: ((cme.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=4
130. 0.014 0.040 ↓ 5.0 25 1

Hash (cost=23.66..23.66 rows=5 width=89) (actual time=0.04..0.04 rows=25 loops=1)

  • Buffers: shared hit=13
131. 0.017 0.026 ↓ 5.0 25 1

Bitmap Heap Scan on employee cae (cost=4.45..23.66 rows=5 width=89) (actual time=0.012..0.026 rows=25 loops=1)

  • Filter: (NOT cae.is_deleted)
  • Heap Blocks: exact=9
  • Buffers: shared hit=13
132. 0.009 0.009 ↓ 5.0 25 1

Bitmap Index Scan on "ux_employee$company_id$employee_id" (cost=0..4.45 rows=5 width=0) (actual time=0.009..0.009 rows=25 loops=1)

  • Index Cond: ((cae.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=4
133. 146.285 168.168 ↓ 779.0 779 858

Materialize (cost=705.67..1,698.16 rows=1 width=99) (actual time=0.002..0.196 rows=779 loops=858)

  • Buffers: shared hit=3,418
134. 0.373 21.883 ↓ 779.0 779 1

Nested Loop (cost=705.67..1,698.16 rows=1 width=99) (actual time=1.508..21.883 rows=779 loops=1)

  • Buffers: shared hit=3,418
135. 0.009 0.009 ↑ 1.0 1 1

Index Scan using company_pk on company company_3 (cost=0.28..8.3 rows=1 width=33) (actual time=0.007..0.009 rows=1 loops=1)

  • Index Cond: ((company_3.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Filter: (NOT company_3.is_deleted)
  • Buffers: shared hit=3
136. 0.831 21.501 ↓ 779.0 779 1

Nested Loop (cost=705.39..1,689.85 rows=1 width=99) (actual time=1.49..21.501 rows=779 loops=1)

  • Buffers: shared hit=3,415
137. 3.495 15.996 ↓ 779.0 779 1

Hash Join (cost=704.97..1,687.95 rows=1 width=132) (actual time=1.473..15.996 rows=779 loops=1)

  • Buffers: shared hit=295
138. 7.161 11.115 ↑ 1.0 10,074 1

GroupAggregate (cost=0.29..829.63 rows=10,074 width=37) (actual time=0.02..11.115 rows=10,074 loops=1)

  • Group Key: client_partner.client_id
  • Buffers: shared hit=115
139. 3.954 3.954 ↑ 1.0 11,938 1

Index Only Scan using client_partner_uk1 on client_partner client_partner (cost=0.29..669.2 rows=11,938 width=37) (actual time=0.014..3.954 rows=11,938 loops=1)

  • Index Cond: (client_partner.date_effective <= ('now'::cstring)::date)
  • Buffers: shared hit=115
140. 0.495 1.386 ↑ 1.0 1,256 1

Hash (cost=685.84..685.84 rows=1,256 width=103) (actual time=1.386..1.386 rows=1,256 loops=1)

  • Buffers: shared hit=180
141. 0.795 0.891 ↑ 1.0 1,256 1

Bitmap Heap Scan on client_partner cp (cost=94.14..685.84 rows=1,256 width=103) (actual time=0.114..0.891 rows=1,256 loops=1)

  • Filter: (NOT cp.is_deleted)
  • Heap Blocks: exact=168
  • Buffers: shared hit=180
142. 0.096 0.096 ↑ 1.0 1,256 1

Bitmap Index Scan on "ix_client_partner$company_id" (cost=0..93.83 rows=1,256 width=0) (actual time=0.096..0.096 rows=1,256 loops=1)

  • Index Cond: ((cp.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=12
143. 4.674 4.674 ↑ 1.0 1 779

Index Scan using client_pk on client c_2 (cost=0.42..1.9 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=779)

  • Index Cond: ((c_2.client_id)::text = (client_partner.client_id)::text)
  • Filter: (NOT c_2.is_deleted)
  • Buffers: shared hit=3,120
144. 0.015 0.046 ↓ 5.0 25 1

Hash (cost=23.66..23.66 rows=5 width=89) (actual time=0.046..0.046 rows=25 loops=1)

  • Buffers: shared hit=13
145. 0.020 0.031 ↓ 5.0 25 1

Bitmap Heap Scan on employee cpe (cost=4.45..23.66 rows=5 width=89) (actual time=0.015..0.031 rows=25 loops=1)

  • Filter: (NOT cpe.is_deleted)
  • Heap Blocks: exact=9
  • Buffers: shared hit=13
146. 0.011 0.011 ↓ 5.0 25 1

Bitmap Index Scan on "ux_employee$company_id$employee_id" (cost=0..4.45 rows=5 width=0) (actual time=0.011..0.011 rows=25 loops=1)

  • Index Cond: ((cpe.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=4
147. 0.274 1,757.132 ↓ 9.4 159 1

Hash (cost=4,721.94..4,721.94 rows=17 width=99) (actual time=1,757.132..1,757.132 rows=159 loops=1)

  • Buffers: shared hit=1,597,393
148. 104.300 1,756.858 ↓ 9.4 159 1

Nested Loop (cost=4,627.25..4,721.94 rows=17 width=99) (actual time=155.868..1,756.858 rows=159 loops=1)

  • Buffers: shared hit=1,597,393
149. 295.514 591.746 ↓ 58,934.0 530,406 1

Nested Loop (cost=4,626.96..4,658.35 rows=9 width=41) (actual time=153.324..591.746 rows=530,406 loops=1)

  • Buffers: shared hit=3,349
150. 50.384 178.364 ↓ 294.7 58,934 1

HashAggregate (cost=4,626.96..4,628.96 rows=200 width=8) (actual time=153.284..178.364 rows=58,934 loops=1)

  • Group Key: min(contact_relationship.created)
  • Buffers: shared hit=3,344
151. 51.145 127.980 ↓ 11.0 58,935 1

HashAggregate (cost=4,506.45..4,560.01 rows=5,356 width=41) (actual time=104.996..127.98 rows=58,935 loops=1)

  • Group Key: contact_relationship.b__contact_id
  • Buffers: shared hit=3,344
152. 45.043 76.835 ↓ 11.0 58,937 1

Hash Join (cost=6.99..4,479.67 rows=5,356 width=41) (actual time=0.053..76.835 rows=58,937 loops=1)

  • Buffers: shared hit=3,344
153. 31.753 31.753 ↑ 1.0 87,983 1

Seq Scan on contact_relationship contact_relationship (cost=0..4,231.72 rows=89,272 width=74) (actual time=0.007..31.753 rows=87,983 loops=1)

  • Filter: (NOT contact_relationship.is_deleted)
  • Buffers: shared hit=3,339
154. 0.005 0.039 ↑ 1.0 9 1

Hash (cost=6.88..6.88 rows=9 width=33) (actual time=0.039..0.039 rows=9 loops=1)

  • Buffers: shared hit=5
155. 0.034 0.034 ↑ 1.0 9 1

Seq Scan on contact_relationship_type contact_relationship_type_1 (cost=0..6.88 rows=9 width=33) (actual time=0.027..0.034 rows=9 loops=1)

  • Filter: ((contact_relationship_type_1.system_id)::text = 'TAXMATTERSCONTACT'::text)
  • Buffers: shared hit=5
156. 117.826 117.868 ↑ 1.0 9 58,934

Materialize (cost=0..6.92 rows=9 width=33) (actual time=0..0.002 rows=9 loops=58,934)

  • Buffers: shared hit=5
157. 0.042 0.042 ↑ 1.0 9 1

Seq Scan on contact_relationship_type contact_relationship_type (cost=0..6.88 rows=9 width=33) (actual time=0.035..0.042 rows=9 loops=1)

  • Filter: ((contact_relationship_type.system_id)::text = 'TAXMATTERSCONTACT'::text)
  • Buffers: shared hit=5
158. 1,060.812 1,060.812 ↓ 0.0 0 530,406

Index Scan using "ix_contact_relationship$created" on contact_relationship cr (cost=0.29..7.05 rows=1 width=140) (actual time=0.002..0.002 rows=0 loops=530,406)

  • Index Cond: (cr.created = (min(contact_relationship.created)))
  • Filter: ((NOT cr.is_deleted) AND ((cr.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text))
  • Buffers: shared hit=1,594,044
159. 22.170 96.070 ↑ 1.0 1 7,390

Bitmap Heap Scan on contact pfc (cost=3.08..11.02 rows=1 width=83) (actual time=0.012..0.013 rows=1 loops=7,390)

  • Filter: ((NOT pfc.is_deleted) AND ((pfc.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text) AND ((pfc.company_id)::text = (si.company_id)::text) AND (((si.project_for__contact_id IS NOT NULL) AND ((pfc.contact_id)::text = (si.project_for__contact_id)::text)) OR ((si.project_for__contact_id IS NULL) AND ((pfc.contact_id)::text = (task_project.project_for__contact_id)::text))))
  • Heap Blocks: exact=7,571
  • Buffers: shared hit=32,907
160. 14.780 73.900 ↓ 0.0 0 7,390

BitmapOr (cost=3.08..3.08 rows=2 width=0) (actual time=0.01..0.01 rows=0 loops=7,390)

  • Buffers: shared hit=25,336
161. 29.560 29.560 ↑ 1.0 1 7,390

Bitmap Index Scan on contact_pk (cost=0..1.19 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=7,390)

  • Index Cond: ((pfc.contact_id)::text = (si.project_for__contact_id)::text)
  • Buffers: shared hit=11,933
162. 29.560 29.560 ↑ 1.0 1 7,390

Bitmap Index Scan on contact_pk (cost=0..1.19 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=7,390)

  • Index Cond: ((pfc.contact_id)::text = (task_project.project_for__contact_id)::text)
  • Buffers: shared hit=13,403
163. 0.627 1.906 ↑ 1.1 1,309 1

Hash (cost=3,618.99..3,618.99 rows=1,387 width=89) (actual time=1.906..1.906 rows=1,309 loops=1)

  • Buffers: shared hit=319
164. 1.146 1.279 ↑ 1.1 1,309 1

Bitmap Heap Scan on contact tmc (cost=55.17..3,618.99 rows=1,387 width=89) (actual time=0.166..1.279 rows=1,309 loops=1)

  • Filter: (NOT tmc.is_deleted)
  • Heap Blocks: exact=302
  • Buffers: shared hit=319
165. 0.133 0.133 ↑ 1.1 1,309 1

Bitmap Index Scan on contact_ix1 (cost=0..54.82 rows=1,387 width=0) (actual time=0.133..0.133 rows=1,309 loops=1)

  • Index Cond: ((tmc.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=17
166. 0.263 0.742 ↑ 1.0 539 1

Hash (cost=1,535.38..1,535.38 rows=553 width=134) (actual time=0.742..0.742 rows=539 loops=1)

  • Buffers: shared hit=122
167. 0.430 0.479 ↑ 1.0 539 1

Bitmap Heap Scan on contact_email tmc_pce (cost=20.72..1,535.38 rows=553 width=134) (actual time=0.064..0.479 rows=539 loops=1)

  • Filter: ((NOT tmc_pce.is_deleted) AND tmc_pce.is_primary)
  • Heap Blocks: exact=115
  • Buffers: shared hit=122
168. 0.049 0.049 ↓ 1.1 592 1

Bitmap Index Scan on "ix_contact_email$company_id" (cost=0..20.58 rows=555 width=0) (actual time=0.049..0.049 rows=592 loops=1)

  • Index Cond: ((tmc_pce.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=7
169. 0.154 0.498 ↑ 1.0 321 1

Hash (cost=1,213.49..1,213.49 rows=331 width=128) (actual time=0.498..0.498 rows=321 loops=1)

  • Buffers: shared hit=88
170. 0.300 0.344 ↑ 1.0 321 1

Bitmap Heap Scan on contact_phone tmc_pcp (cost=19.72..1,213.49 rows=331 width=128) (actual time=0.055..0.344 rows=321 loops=1)

  • Filter: ((NOT tmc_pcp.is_deleted) AND tmc_pcp.is_primary)
  • Heap Blocks: exact=81
  • Buffers: shared hit=88
171. 0.044 0.044 ↓ 1.2 504 1

Bitmap Index Scan on "ix_contact_phone$company_id" (cost=0..19.64 rows=429 width=0) (actual time=0.044..0.044 rows=504 loops=1)

  • Index Cond: ((tmc_pcp.company_id)::text = '053F0A8A16BA43CDA28755FAE371B3B9'::text)
  • Buffers: shared hit=7
172.          

SubPlan (for Hash Join)

173. 7.390 169.970 ↓ 0.0 0 7,390

Limit (cost=10.96..10.97 rows=1 width=48) (actual time=0.022..0.023 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
174. 22.170 162.580 ↓ 0.0 0 7,390

Sort (cost=10.96..10.97 rows=1 width=48) (actual time=0.022..0.022 rows=0 loops=7,390)

  • Sort Key: sid_2.changed DESC, d_1.code DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=22,364
175. 61.350 140.410 ↓ 0.0 0 7,390

Hash Join (cost=8.31..10.95 rows=1 width=48) (actual time=0.016..0.019 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
176. 34.720 34.720 ↓ 1.1 54 2,480

Seq Scan on department d_1 (cost=0..2.5 rows=50 width=40) (actual time=0.001..0.014 rows=54 loops=2,480)

  • Buffers: shared hit=4,959
177. 7.390 44.340 ↓ 0.0 0 7,390

Hash (cost=8.3..8.3 rows=1 width=41) (actual time=0.006..0.006 rows=0 loops=7,390)

  • Buffers: shared hit=17,405
178. 36.950 36.950 ↓ 0.0 0 7,390

Index Scan using schedule_item_department_uk1 on schedule_item_department sid_2 (cost=0.28..8.3 rows=1 width=41) (actual time=0.005..0.005 rows=0 loops=7,390)

  • Index Cond: ((sid_2.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=17,405
179. 7.390 147.800 ↓ 0.0 0 7,390

Limit (cost=10.96..10.97 rows=1 width=15) (actual time=0.02..0.02 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
180. 14.780 140.410 ↓ 0.0 0 7,390

Sort (cost=10.96..10.97 rows=1 width=15) (actual time=0.019..0.019 rows=0 loops=7,390)

  • Sort Key: sid_3.changed DESC, d_2.code DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=22,364
181. 53.960 125.630 ↓ 0.0 0 7,390

Hash Join (cost=8.31..10.95 rows=1 width=15) (actual time=0.014..0.017 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
182. 34.720 34.720 ↓ 1.1 54 2,480

Seq Scan on department d_2 (cost=0..2.5 rows=50 width=40) (actual time=0.001..0.014 rows=54 loops=2,480)

  • Buffers: shared hit=4,959
183. 7.390 36.950 ↓ 0.0 0 7,390

Hash (cost=8.3..8.3 rows=1 width=41) (actual time=0.005..0.005 rows=0 loops=7,390)

  • Buffers: shared hit=17,405
184. 29.560 29.560 ↓ 0.0 0 7,390

Index Scan using schedule_item_department_uk1 on schedule_item_department sid_3 (cost=0.28..8.3 rows=1 width=41) (actual time=0.004..0.004 rows=0 loops=7,390)

  • Index Cond: ((sid_3.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=17,405
185. 7.390 147.800 ↓ 0.0 0 7,390

Limit (cost=10.96..10.97 rows=1 width=35) (actual time=0.019..0.02 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
186. 14.780 140.410 ↓ 0.0 0 7,390

Sort (cost=10.96..10.97 rows=1 width=35) (actual time=0.019..0.019 rows=0 loops=7,390)

  • Sort Key: sid_4.changed DESC, d_3.code DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=22,364
187. 53.960 125.630 ↓ 0.0 0 7,390

Hash Join (cost=8.31..10.95 rows=1 width=35) (actual time=0.014..0.017 rows=0 loops=7,390)

  • Buffers: shared hit=22,364
188. 34.720 34.720 ↓ 1.1 54 2,480

Seq Scan on department d_3 (cost=0..2.5 rows=50 width=60) (actual time=0.001..0.014 rows=54 loops=2,480)

  • Buffers: shared hit=4,959
189. 7.390 36.950 ↓ 0.0 0 7,390

Hash (cost=8.3..8.3 rows=1 width=41) (actual time=0.005..0.005 rows=0 loops=7,390)

  • Buffers: shared hit=17,405
190. 29.560 29.560 ↓ 0.0 0 7,390

Index Scan using schedule_item_department_uk1 on schedule_item_department sid_4 (cost=0.28..8.3 rows=1 width=41) (actual time=0.004..0.004 rows=0 loops=7,390)

  • Index Cond: ((sid_4.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=17,405
191. 14.780 81.290 ↑ 1.0 1 7,390

Limit (cost=8.44..8.45 rows=1 width=45) (actual time=0.01..0.011 rows=1 loops=7,390)

  • Buffers: shared hit=27,013
192. 14.780 66.510 ↑ 1.0 1 7,390

Sort (cost=8.44..8.45 rows=1 width=45) (actual time=0.009..0.009 rows=1 loops=7,390)

  • Sort Key: sia_2.sort_order, sia_2.created
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=27,013
193. 51.730 51.730 ↑ 1.0 1 7,390

Index Scan using schedule_item_assignment_ix1 on schedule_item_assignment sia_2 (cost=0.41..8.43 rows=1 width=45) (actual time=0.007..0.007 rows=1 loops=7,390)

  • Index Cond: ((sia_2.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Filter: (sia_2.is_primary AND (NOT sia_2.is_secondary) AND (NOT sia_2.is_deleted))
  • Buffers: shared hit=27,013
194. 0.000 51.730 ↓ 0.0 0 7,390

Limit (cost=8.44..8.45 rows=1 width=45) (actual time=0.007..0.007 rows=0 loops=7,390)

  • Buffers: shared hit=27,013
195. 14.780 51.730 ↓ 0.0 0 7,390

Sort (cost=8.44..8.45 rows=1 width=45) (actual time=0.007..0.007 rows=0 loops=7,390)

  • Sort Key: sia_3.sort_order, sia_3.created
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=27,013
196. 36.950 36.950 ↓ 0.0 0 7,390

Index Scan using schedule_item_assignment_ix1 on schedule_item_assignment sia_3 (cost=0.41..8.43 rows=1 width=45) (actual time=0.005..0.005 rows=0 loops=7,390)

  • Index Cond: ((sia_3.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Filter: (sia_3.is_primary AND sia_3.is_secondary AND (NOT sia_3.is_deleted))
  • Buffers: shared hit=27,013
197. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on schedule_item schedule_item (cost=4.45..20.19 rows=1 width=0) (never executed)

  • Filter: ((schedule_item.schedule_item_type_id)::text = 'PROJECT'::text)
198. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on schedule_item_ix18 (cost=0..4.45 rows=4 width=0) (never executed)

  • Index Cond: ((schedule_item.task_project__schedule_item_id)::text = (si.schedule_item_id)::text)
199. 34.129 34.129 ↓ 1.0 21,208 1

Seq Scan on schedule_item schedule_item_1 (cost=0..6,611.27 rows=21,188 width=32) (actual time=0.009..34.129 rows=21,208 loops=1)

  • Filter: ((schedule_item_1.schedule_item_type_id)::text = 'PROJECT'::text)
  • Buffers: shared hit=5,785
200. 22.170 288.210 ↑ 1.0 1 7,390

GroupAggregate (cost=37..37.03 rows=1 width=65) (actual time=0.039..0.039 rows=1 loops=7,390)

  • Group Key: p.schedule_item_id
  • Buffers: shared hit=86,688
201. 22.170 266.040 ↓ 3.0 3 7,390

Sort (cost=37..37 rows=1 width=43) (actual time=0.036..0.036 rows=3 loops=7,390)

  • Sort Key: p.schedule_item_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=86,688
202. 31.774 243.870 ↓ 3.0 3 7,390

Nested Loop (cost=13.3..36.99 rows=1 width=43) (actual time=0.028..0.033 rows=3 loops=7,390)

  • Buffers: shared hit=86,688
203. 22.170 118.240 ↑ 1.0 1 7,390

Bitmap Heap Scan on schedule_item p (cost=8.85..16.77 rows=1 width=38) (actual time=0.016..0.016 rows=1 loops=7,390)

  • Filter: ((NOT p.is_deleted) AND ((p.schedule_item_type_id)::text = 'PROJECT'::text))
  • Heap Blocks: exact=11,706
  • Buffers: shared hit=47,586
204. 7.390 96.070 ↓ 0.0 0 7,390

BitmapOr (cost=8.85..8.85 rows=2 width=0) (actual time=0.013..0.013 rows=0 loops=7,390)

  • Buffers: shared hit=35,880
205. 51.730 51.730 ↑ 1.0 1 7,390

Bitmap Index Scan on schedule_item_uk18 (cost=0..4.43 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=7,390)

  • Index Cond: ((p.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=22,391
206. 36.950 36.950 ↑ 1.0 1 7,390

Bitmap Index Scan on schedule_item_uk18 (cost=0..4.43 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=7,390)

  • Index Cond: ((p.schedule_item_id)::text = (si.task_project__schedule_item_id)::text)
  • Buffers: shared hit=13,489
207. 46.928 93.856 ↓ 1.5 3 6,704

Bitmap Heap Scan on schedule_item t (cost=4.45..20.19 rows=2 width=38) (actual time=0.01..0.014 rows=3 loops=6,704)

  • Filter: ((NOT t.is_deleted) AND ((t.schedule_item_type_id)::text = 'TASK'::text))
  • Heap Blocks: exact=18,586
  • Buffers: shared hit=39,102
208. 46.928 46.928 ↑ 1.3 3 6,704

Bitmap Index Scan on schedule_item_ix18 (cost=0..4.45 rows=4 width=0) (actual time=0.007..0.007 rows=3 loops=6,704)

  • Index Cond: ((t.task_project__schedule_item_id)::text = (p.schedule_item_id)::text)
  • Buffers: shared hit=20,516
209. 7.390 88.680 ↓ 0.0 0 7,390

GroupAggregate (cost=4.87..28.67 rows=1 width=41) (actual time=0.012..0.012 rows=0 loops=7,390)

  • Group Key: p_1.schedule_item_id
  • Buffers: shared hit=41,761
210. 13.379 81.290 ↑ 2.0 1 7,390

Nested Loop (cost=4.87..28.65 rows=2 width=33) (actual time=0.01..0.011 rows=1 loops=7,390)

  • Buffers: shared hit=41,761
211. 44.340 44.340 ↓ 0.0 0 7,390

Index Scan using schedule_item_uk18 on schedule_item p_1 (cost=0.42..8.44 rows=1 width=33) (actual time=0.006..0.006 rows=0 loops=7,390)

  • Index Cond: ((p_1.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Filter: ((NOT p_1.is_deleted) AND ((p_1.schedule_item_type_id)::text = 'PROJECT'::text))
  • Buffers: shared hit=29,781
212. 7.857 23.571 ↑ 1.0 2 2,619

Bitmap Heap Scan on schedule_item t_1 (cost=4.45..20.19 rows=2 width=33) (actual time=0.007..0.009 rows=2 loops=2,619)

  • Filter: ((NOT t_1.is_deleted) AND ((t_1.schedule_item_type_id)::text = 'TASK'::text))
  • Heap Blocks: exact=4,024
  • Buffers: shared hit=11,980
213. 15.714 15.714 ↑ 2.0 2 2,619

Bitmap Index Scan on schedule_item_ix18 (cost=0..4.45 rows=4 width=0) (actual time=0.006..0.006 rows=2 loops=2,619)

  • Index Cond: ((t_1.task_project__schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=7,956
214. 7.390 133.020 ↓ 0.0 0 7,390

GroupAggregate (cost=5.28..45.53 rows=1 width=41) (actual time=0.018..0.018 rows=0 loops=7,390)

  • Group Key: p_2.schedule_item_id
  • Buffers: shared hit=61,686
215. 3.970 125.630 ↑ 1.0 1 7,390

Nested Loop (cost=5.28..45.51 rows=1 width=33) (actual time=0.012..0.017 rows=1 loops=7,390)

  • Buffers: shared hit=61,686
216. 10.370 96.070 ↑ 1.0 1 7,390

Nested Loop (cost=4.86..37.06 rows=1 width=33) (actual time=0.01..0.013 rows=1 loops=7,390)

  • Buffers: shared hit=44,429
217. 14.780 59.120 ↑ 2.0 1 7,390

Bitmap Heap Scan on schedule_item t_2 (cost=4.45..20.19 rows=2 width=66) (actual time=0.007..0.008 rows=1 loops=7,390)

  • Filter: ((NOT t_2.is_deleted) AND ((t_2.schedule_item_type_id)::text = 'TASK'::text))
  • Heap Blocks: exact=4,369
  • Buffers: shared hit=26,709
218. 44.340 44.340 ↑ 4.0 1 7,390

Bitmap Index Scan on schedule_item_ix18 (cost=0..4.45 rows=4 width=0) (actual time=0.006..0.006 rows=1 loops=7,390)

  • Index Cond: ((t_2.task_project__schedule_item_id)::text = (si.schedule_item_id)::text)
  • Buffers: shared hit=22,340
219. 26.580 26.580 ↑ 1.0 1 4,430

Index Scan using tracking_description_pk on tracking_description td_1 (cost=0.41..8.43 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=4,430)

  • Index Cond: ((td_1.tracking_description_id)::text = (t_2.tracking_description_id)::text)
  • Filter: ((td_1.system_id)::text = ANY ('{CANCELED,COMPLETED}'::text[]))
  • Buffers: shared hit=17,720
220. 25.590 25.590 ↑ 1.0 1 4,265

Index Scan using schedule_item_uk18 on schedule_item p_2 (cost=0.42..8.44 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=4,265)

  • Index Cond: ((p_2.schedule_item_id)::text = (si.schedule_item_id)::text)
  • Filter: ((NOT p_2.is_deleted) AND ((p_2.schedule_item_type_id)::text = 'PROJECT'::text))
  • Buffers: shared hit=17,257
Planning time : 37.311 ms
Execution time : 3,924.076 ms