explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XIz4

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.841 ↓ 0.0 0 1

GroupAggregate (cost=121,734.03..121,768.67 rows=200 width=616) (actual time=0.841..0.841 rows=0 loops=1)

  • Group Key: multidatasourceresult.work_performed_on, multidatasourceresult.gds_assignment_ref, multidatasourceresult.week_worked_on, multidatasourceresult.month_worked_on, multidatasourceresult.provider_portrait_url, multidatasourceresult.company_id, multidatasourceresult.company_display_name, multidatasourceresult.company_logo_url, multidatasourceresult.assignment_name, multidatasourceresult.assignment_team_id, multidatasourceresult.agency_team, multidatasourceresult.agency_team_name, multidatasourceresult.contract_type, multidatasourceresult.payment_type, multidatasourceresult.payment_description
2. 0.027 0.841 ↓ 0.0 0 1

Sort (cost=121,734.03..121,735.47 rows=574 width=616) (actual time=0.840..0.841 rows=0 loops=1)

  • Sort Key: multidatasourceresult.work_performed_on, multidatasourceresult.gds_assignment_ref, multidatasourceresult.week_worked_on, multidatasourceresult.month_worked_on, multidatasourceresult.provider_portrait_url, multidatasourceresult.company_id, multidatasourceresult.company_display_name, multidatasourceresult.company_logo_url, multidatasourceresult.assignment_name, multidatasourceresult.assignment_team_id, multidatasourceresult.agency_team, multidatasourceresult.agency_team_name, multidatasourceresult.contract_type, multidatasourceresult.payment_type, multidatasourceresult.payment_description
  • Sort Method: quicksort Memory: 25kB
3. 0.000 0.814 ↓ 0.0 0 1

Subquery Scan on multidatasourceresult (cost=3,279.49..121,707.73 rows=574 width=616) (actual time=0.814..0.814 rows=0 loops=1)

4. 0.001 0.814 ↓ 0.0 0 1

Append (cost=3,279.49..121,701.99 rows=574 width=616) (actual time=0.814..0.814 rows=0 loops=1)

5. 0.000 0.471 ↓ 0.0 0 1

GroupAggregate (cost=3,279.49..38,129.00 rows=179 width=616) (actual time=0.471..0.471 rows=0 loops=1)

  • Group Key: (to_char((ct.worked_date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (ct.worked_date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (ct.worked_date)::timestamp with time zone), 'yyyymmdd'::text)), ct.contract_id
6.          

Initplan (for GroupAggregate)

7. 0.002 0.018 ↑ 1.0 1 1

Limit (cost=0.56..8.58 rows=1 width=8) (actual time=0.018..0.018 rows=1 loops=1)

8. 0.016 0.016 ↑ 1.0 1 1

Index Scan using dim_developers_user_id_idx on dim_developers dim_developers_4 (cost=0.56..8.58 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (lower((user_id)::text) = 'alexmamonchik'::text)
9. 0.015 0.471 ↓ 0.0 0 1

Sort (cost=3,270.91..3,271.36 rows=179 width=122) (actual time=0.471..0.471 rows=0 loops=1)

  • Sort Key: (to_char((ct.worked_date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (ct.worked_date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (ct.worked_date)::timestamp with time zone), 'yyyymmdd'::text)), ct.contract_id
  • Sort Method: quicksort Memory: 25kB
10. 0.016 0.456 ↓ 0.0 0 1

Nested Loop (cost=0.43..3,264.22 rows=179 width=122) (actual time=0.456..0.456 rows=0 loops=1)

11. 0.055 0.055 ↓ 1.2 35 1

Index Scan using dim_assignments_developer_id_idx on dim_assignments (cost=0.43..103.90 rows=30 width=8) (actual time=0.028..0.055 rows=35 loops=1)

  • Index Cond: (developer_id = $99)
12. 0.000 0.385 ↓ 0.0 0 35

Append (cost=0.00..104.98 rows=24 width=30) (actual time=0.011..0.011 rows=0 loops=35)

13. 0.000 0.000 ↓ 0.0 0 35

Seq Scan on data_contracttime_days ct (cost=0.00..0.00 rows=1 width=48) (actual time=0.000..0.000 rows=0 loops=35)

  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND (dim_assignments.id = contract_id) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
14. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201904_contract_id_idx on part_data_contracttime_days_201904 ct_1 (cost=0.29..8.56 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
15. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201905_contract_id_idx on part_data_contracttime_days_201905 ct_2 (cost=0.29..8.49 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
16. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201906_contract_id_idx on part_data_contracttime_days_201906 ct_3 (cost=0.29..8.52 rows=2 width=29) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
17. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201907_contract_id_idx on part_data_contracttime_days_201907 ct_4 (cost=0.29..8.55 rows=2 width=29) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
18. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201908_contract_id_idx on part_data_contracttime_days_201908 ct_5 (cost=0.29..8.98 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
19. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201909_contract_id_idx on part_data_contracttime_days_201909 ct_6 (cost=0.29..9.46 rows=2 width=29) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
20. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201910_contract_id_idx on part_data_contracttime_days_201910 ct_7 (cost=0.29..9.77 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
21. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201911_contract_id_idx on part_data_contracttime_days_201911 ct_8 (cost=0.29..8.34 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
22. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_201912_contract_id_idx on part_data_contracttime_days_201912 ct_9 (cost=0.29..8.40 rows=2 width=29) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
23. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_202001_contract_id_idx on part_data_contracttime_days_202001 ct_10 (cost=0.29..8.77 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
24. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_202002_contract_id_idx on part_data_contracttime_days_202002 ct_11 (cost=0.29..8.71 rows=2 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
25. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_contracttime_days_202003_contract_id_idx on part_data_contracttime_days_202003 ct_12 (cost=0.29..8.43 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (contract_id = dim_assignments.id)
  • Filter: ((worked_date >= '2019-04-02'::date) AND (worked_date <= '2020-03-08'::date) AND ((minutes_online <> 0) OR (minutes_offline <> 0) OR ((cells_overtime IS NOT NULL) AND (array_length(cells_overtime, 1) <> 0))))
26.          

SubPlan (for GroupAggregate)

27. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.01..17.03 rows=1 width=114) (never executed)

28.          

Initplan (for Limit)

29. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_22 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_developers_pkey on dim_developers d_4 (cost=0.56..8.58 rows=1 width=114) (never executed)

  • Index Cond: (id = $77)
32. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=21) (never executed)

33.          

Initplan (for Limit)

34. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_23 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
36. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=21) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_16 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $79)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_12 (cost=0.43..8.45 rows=1 width=29) (never executed)

  • Index Cond: (id = t_16.team_rollup)
39. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=22) (never executed)

40.          

Initplan (for Limit)

41. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_24 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
43. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=22) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_17 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $82)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_13 (cost=0.43..8.45 rows=1 width=30) (never executed)

  • Index Cond: (id = t_17.team_rollup)
46. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=183) (never executed)

47.          

Initplan (for Limit)

48. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_25 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
50. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=183) (never executed)

51. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_18 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $85)
52. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_14 (cost=0.43..8.45 rows=1 width=191) (never executed)

  • Index Cond: (id = t_18.team_rollup)
53. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=51) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_26 (cost=0.43..8.45 rows=1 width=51) (never executed)

  • Index Cond: (id = ct.contract_id)
55. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

56.          

Initplan (for Limit)

57. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

58. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_27 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
59. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_19 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $89)
60. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

61.          

Initplan (for Limit)

62. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_28 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
64. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_12 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $91)
65. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=20) (never executed)

66.          

Initplan (for Limit)

67. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_29 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
69. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=20) (never executed)

70. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_13 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $93)
71. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies agc_4 (cost=0.43..8.45 rows=1 width=28) (never executed)

  • Index Cond: (id = ag_13.company_ref)
72. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=32) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_32 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (id = ct.contract_id)
74. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

75.          

Initplan (for Limit)

76. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_30 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ct.contract_id)
78. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_14 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $96)
79. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=32) (never executed)

80. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_31 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (id = ct.contract_id)
81. 0.000 0.149 ↓ 0.0 0 1

GroupAggregate (cost=2,235.02..30,258.86 rows=144 width=650) (actual time=0.149..0.149 rows=0 loops=1)

  • Group Key: (to_char((aa.date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (aa.date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (aa.date)::timestamp with time zone), 'yyyymmdd'::text)), aa.assignment_id, ((SubPlan 57)), aa.comment
82.          

Initplan (for GroupAggregate)

83. 0.000 0.004 ↑ 1.0 1 1

Limit (cost=0.56..8.58 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

84. 0.004 0.004 ↑ 1.0 1 1

Index Scan using dim_developers_user_id_idx on dim_developers dim_developers_3 (cost=0.56..8.58 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (lower((user_id)::text) = 'alexmamonchik'::text)
85. 0.012 0.149 ↓ 0.0 0 1

Sort (cost=2,226.44..2,226.80 rows=144 width=208) (actual time=0.149..0.149 rows=0 loops=1)

  • Sort Key: (to_char((aa.date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (aa.date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (aa.date)::timestamp with time zone), 'yyyymmdd'::text)), aa.assignment_id, ((SubPlan 57)), aa.comment
  • Sort Method: quicksort Memory: 25kB
86. 0.013 0.137 ↓ 0.0 0 1

Nested Loop (cost=0.86..2,221.28 rows=144 width=208) (actual time=0.137..0.137 rows=0 loops=1)

87. 0.019 0.019 ↓ 1.2 35 1

Index Scan using dim_assignments_developer_id_idx on dim_assignments dim_assignments_1 (cost=0.43..103.90 rows=30 width=8) (actual time=0.007..0.019 rows=35 loops=1)

  • Index Cond: (developer_id = $75)
88. 0.105 0.105 ↓ 0.0 0 35

Index Scan using data_company_adjustments_agencies_days_assignment_id on data_company_adjustments_agencies_days aa (cost=0.42..29.84 rows=5 width=90) (actual time=0.003..0.003 rows=0 loops=35)

  • Index Cond: (assignment_id = dim_assignments_1.id)
  • Filter: ((date >= '2019-04-02'::date) AND (date <= '2020-03-08'::date) AND ((adj_reason)::text <> 'Enterprise Milestone'::text))
  • Rows Removed by Filter: 0
89.          

SubPlan (for Nested Loop)

90. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.46 rows=1 width=32) (never executed)

91. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_21 (cost=0.43..8.46 rows=1 width=32) (never executed)

  • Index Cond: (id = aa.assignment_id)
92.          

SubPlan (for GroupAggregate)

93. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.01..17.03 rows=1 width=114) (never executed)

94.          

Initplan (for Limit)

95. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_11 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
97. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_developers_pkey on dim_developers d_3 (cost=0.56..8.58 rows=1 width=114) (never executed)

  • Index Cond: (id = $52)
98. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=21) (never executed)

99.          

Initplan (for Limit)

100. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_12 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
102. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=21) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_12 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $54)
104. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_9 (cost=0.43..8.45 rows=1 width=29) (never executed)

  • Index Cond: (id = t_12.team_rollup)
105. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=22) (never executed)

106.          

Initplan (for Limit)

107. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

108. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_13 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
109. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=22) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_13 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $57)
111. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_10 (cost=0.43..8.45 rows=1 width=30) (never executed)

  • Index Cond: (id = t_13.team_rollup)
112. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=183) (never executed)

113.          

Initplan (for Limit)

114. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

115. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_14 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
116. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=183) (never executed)

117. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_14 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $60)
118. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_11 (cost=0.43..8.45 rows=1 width=191) (never executed)

  • Index Cond: (id = t_14.team_rollup)
119. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=51) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_15 (cost=0.43..8.45 rows=1 width=51) (never executed)

  • Index Cond: (id = aa.assignment_id)
121. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

122.          

Initplan (for Limit)

123. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

124. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_16 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
125. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_15 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $64)
126. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

127.          

Initplan (for Limit)

128. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

129. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_17 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
130. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_9 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $66)
131. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=20) (never executed)

132.          

Initplan (for Limit)

133. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

134. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_18 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
135. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=20) (never executed)

136. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_10 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $68)
137. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies agc_3 (cost=0.43..8.45 rows=1 width=28) (never executed)

  • Index Cond: (id = ag_10.company_ref)
138. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=32) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_20 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (id = aa.assignment_id)
140. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

141.          

Initplan (for Limit)

142. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

143. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_19 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = aa.assignment_id)
144. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_11 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $71)
145. 0.000 0.131 ↓ 0.0 0 1

GroupAggregate (cost=4,404.38..52,862.27 rows=249 width=632) (actual time=0.131..0.131 rows=0 loops=1)

  • Group Key: (to_char((ad.date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (ad.date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (ad.date)::timestamp with time zone), 'yyyymmdd'::text)), ad.assignment_id, ((SubPlan 37)), ad.comment
146.          

Initplan (for GroupAggregate)

147. 0.001 0.004 ↑ 1.0 1 1

Limit (cost=0.56..8.58 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

148. 0.003 0.003 ↑ 1.0 1 1

Index Scan using dim_developers_user_id_idx on dim_developers dim_developers_2 (cost=0.56..8.58 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (lower((user_id)::text) = 'alexmamonchik'::text)
149. 0.012 0.131 ↓ 0.0 0 1

Sort (cost=4,395.80..4,396.42 rows=249 width=190) (actual time=0.131..0.131 rows=0 loops=1)

  • Sort Key: (to_char((ad.date)::timestamp with time zone, 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, (ad.date)::timestamp with time zone), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, (ad.date)::timestamp with time zone), 'yyyymmdd'::text)), ad.assignment_id, ((SubPlan 37)), ad.comment
  • Sort Method: quicksort Memory: 25kB
150. 0.000 0.119 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,385.89 rows=249 width=190) (actual time=0.119..0.119 rows=0 loops=1)

151. 0.017 0.017 ↓ 1.2 35 1

Index Scan using dim_assignments_developer_id_idx on dim_assignments dim_assignments_2 (cost=0.43..103.90 rows=30 width=8) (actual time=0.007..0.017 rows=35 loops=1)

  • Index Cond: (developer_id = $50)
152. 0.035 0.105 ↓ 0.0 0 35

Append (cost=0.00..72.21 rows=16 width=73) (actual time=0.003..0.003 rows=0 loops=35)

153. 0.000 0.000 ↓ 0.0 0 35

Seq Scan on data_company_adjustment_developer_days ad (cost=0.00..0.00 rows=1 width=108) (actual time=0.000..0.000 rows=0 loops=35)

  • Filter: ((date >= '2019-04-02'::date) AND (date <= '2020-03-08'::date) AND ((adj_reason)::text <> 'Enterprise Milestone'::text) AND (dim_assignments_2.id = assignment_id))
154. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_company_adjustment_developer_days_2019_assignment_id on part_data_company_adjustment_developer_days_2019 ad_1 (cost=0.42..24.24 rows=5 width=70) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (assignment_id = dim_assignments_2.id)
  • Filter: ((date >= '2019-04-02'::date) AND (date <= '2020-03-08'::date) AND ((adj_reason)::text <> 'Enterprise Milestone'::text))
155. 0.035 0.035 ↓ 0.0 0 35

Index Scan using part_data_company_adjustment_developer_days_2020_assignment_id on part_data_company_adjustment_developer_days_2020 ad_2 (cost=0.42..47.97 rows=10 width=75) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: (assignment_id = dim_assignments_2.id)
  • Filter: ((date >= '2019-04-02'::date) AND (date <= '2020-03-08'::date) AND ((adj_reason)::text <> 'Enterprise Milestone'::text))
156.          

SubPlan (for Nested Loop)

157. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.46 rows=1 width=32) (never executed)

158. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_10 (cost=0.43..8.46 rows=1 width=32) (never executed)

  • Index Cond: (id = ad.assignment_id)
159.          

SubPlan (for GroupAggregate)

160. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.01..17.03 rows=1 width=114) (never executed)

161.          

Initplan (for Limit)

162. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

163. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
164. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_developers_pkey on dim_developers d_2 (cost=0.56..8.58 rows=1 width=114) (never executed)

  • Index Cond: (id = $27)
165. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=21) (never executed)

166.          

Initplan (for Limit)

167. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

168. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
169. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=21) (never executed)

170. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_8 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $29)
171. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_6 (cost=0.43..8.45 rows=1 width=29) (never executed)

  • Index Cond: (id = t_8.team_rollup)
172. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=22) (never executed)

173.          

Initplan (for Limit)

174. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

175. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_2 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
176. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=22) (never executed)

177. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_9 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $32)
178. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_7 (cost=0.43..8.45 rows=1 width=30) (never executed)

  • Index Cond: (id = t_9.team_rollup)
179. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=183) (never executed)

180.          

Initplan (for Limit)

181. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

182. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_3 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
183. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=183) (never executed)

184. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_10 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $35)
185. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_8 (cost=0.43..8.45 rows=1 width=191) (never executed)

  • Index Cond: (id = t_10.team_rollup)
186. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=51) (never executed)

187. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_4 (cost=0.43..8.45 rows=1 width=51) (never executed)

  • Index Cond: (id = ad.assignment_id)
188. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

189.          

Initplan (for Limit)

190. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

191. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_5 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
192. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_11 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $39)
193. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

194.          

Initplan (for Limit)

195. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

196. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_6 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
197. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_6 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $41)
198. 0.000 0.000 ↓ 0.0 0

Limit (cost=9.32..25.37 rows=1 width=20) (never executed)

199.          

Initplan (for Limit)

200. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

201. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_7 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
202. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=20) (never executed)

203. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_7 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = $43)
204. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies agc_2 (cost=0.43..8.45 rows=1 width=28) (never executed)

  • Index Cond: (id = ag_7.company_ref)
205. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=32) (never executed)

206. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_9 (cost=0.43..8.45 rows=1 width=32) (never executed)

  • Index Cond: (id = ad.assignment_id)
207. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.88..16.90 rows=1 width=21) (never executed)

208.          

Initplan (for Limit)

209. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=8) (never executed)

210. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_assignments_pkey on dim_assignments a_8 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = ad.assignment_id)
211. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_8 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = $46)
212. 0.000 0.037 ↓ 0.0 0 1

GroupAggregate (cost=113.04..214.69 rows=1 width=635) (actual time=0.037..0.037 rows=0 loops=1)

  • Group Key: (to_char(upper(fp.active_range), 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, upper(fp.active_range)), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, upper(fp.active_range)), 'yyyymmdd'::text)), fp.id
213.          

Initplan (for GroupAggregate)

214. 0.001 0.004 ↑ 1.0 1 1

Limit (cost=0.56..8.58 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=1)

215. 0.003 0.003 ↑ 1.0 1 1

Index Scan using dim_developers_user_id_idx on dim_developers dim_developers_1 (cost=0.56..8.58 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (lower((user_id)::text) = 'alexmamonchik'::text)
216. 0.009 0.037 ↓ 0.0 0 1

Sort (cost=104.46..104.46 rows=1 width=189) (actual time=0.037..0.037 rows=0 loops=1)

  • Sort Key: (to_char(upper(fp.active_range), 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, upper(fp.active_range)), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, upper(fp.active_range)), 'yyyymmdd'::text)), fp.id
  • Sort Method: quicksort Memory: 25kB
217. 0.028 0.028 ↓ 0.0 0 1

Index Scan using dim_assignments_developer_id_idx on dim_assignments fp (cost=0.43..104.45 rows=1 width=189) (actual time=0.028..0.028 rows=0 loops=1)

  • Index Cond: (developer_id = $25)
  • Filter: ((is_fp2 IS NOT TRUE) AND (fp_charge > '0'::numeric) AND ((job_type)::text = 'Fixed'::text) AND ((status)::text = 'Closed'::text) AND (upper(active_range) >= '2019-04-02'::date) AND (upper(active_range) <= '2020-03-08'::date))
  • Rows Removed by Filter: 35
218.          

SubPlan (for GroupAggregate)

219. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.56..8.58 rows=1 width=114) (never executed)

220. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_developers_pkey on dim_developers d_1 (cost=0.56..8.58 rows=1 width=114) (never executed)

  • Index Cond: (id = fp.developer_id)
221. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=21) (never executed)

222. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=21) (never executed)

223. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_4 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp.company_id)
224. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_3 (cost=0.43..8.45 rows=1 width=29) (never executed)

  • Index Cond: (id = t_4.team_rollup)
225. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=22) (never executed)

226. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=22) (never executed)

227. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_5 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp.company_id)
228. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_4 (cost=0.43..8.45 rows=1 width=30) (never executed)

  • Index Cond: (id = t_5.team_rollup)
229. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=183) (never executed)

230. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=183) (never executed)

231. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_6 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp.company_id)
232. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_5 (cost=0.43..8.45 rows=1 width=191) (never executed)

  • Index Cond: (id = t_6.team_rollup)
233. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=21) (never executed)

234. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_7 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp.company_id)
235. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_3 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp.agency_id)
236. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=20) (never executed)

237. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=20) (never executed)

238. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_4 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp.agency_id)
239. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies agc_1 (cost=0.43..8.45 rows=1 width=28) (never executed)

  • Index Cond: (id = ag_4.company_ref)
240. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_5 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp.agency_id)
241. 0.000 0.025 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5 (cost=129.74..231.44 rows=1 width=635) (actual time=0.025..0.025 rows=0 loops=1)

242. 0.000 0.025 ↓ 0.0 0 1

GroupAggregate (cost=129.74..231.43 rows=1 width=643) (actual time=0.025..0.025 rows=0 loops=1)

  • Group Key: (to_char(to_timestamp(((fp2.source_modified / 1000))::double precision), 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, to_timestamp(((fp2.source_modified / 1000))::double precision)), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, to_timestamp(((fp2.source_modified / 1000))::double precision)), 'yyyymmdd'::text)), fp2a.id, fp2.assignment_id, 'Fixed Price Payment'::text, (((('Milestone '::text || (fp2.sequence_id)::text) || ': '::text) || (fp2.description)::text))
243.          

Initplan (for GroupAggregate)

244. 0.000 0.003 ↑ 1.0 1 1

Limit (cost=0.56..8.58 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

245. 0.003 0.003 ↑ 1.0 1 1

Index Scan using dim_developers_user_id_idx on dim_developers (cost=0.56..8.58 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (lower((user_id)::text) = 'alexmamonchik'::text)
246. 0.011 0.025 ↓ 0.0 0 1

Sort (cost=121.16..121.17 rows=1 width=260) (actual time=0.025..0.025 rows=0 loops=1)

  • Sort Key: (to_char(to_timestamp(((fp2.source_modified / 1000))::double precision), 'yyyymmdd'::text)), (to_char(date_trunc('week'::text, to_timestamp(((fp2.source_modified / 1000))::double precision)), 'yyyymmdd'::text)), (to_char(date_trunc('month'::text, to_timestamp(((fp2.source_modified / 1000))::double precision)), 'yyyymmdd'::text)), fp2.assignment_id, (((('Milestone '::text || (fp2.sequence_id)::text) || ': '::text) || (fp2.description)::text))
  • Sort Method: quicksort Memory: 25kB
247. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.98..121.15 rows=1 width=260) (actual time=0.014..0.014 rows=0 loops=1)

248. 0.014 0.014 ↓ 0.0 0 1

Index Scan using dim_assignments_developer_id_idx on dim_assignments fp2a (cost=0.43..103.98 rows=1 width=89) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (developer_id = $12)
  • Filter: (is_fp2 AND ((job_type)::text = 'Fixed'::text))
  • Rows Removed by Filter: 35
249. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_milestones_assignment_id_state_source_modified_idx on dim_milestones fp2 (cost=0.55..17.12 rows=1 width=108) (never executed)

  • Index Cond: ((assignment_id = fp2a.id) AND ((state)::text = ANY ('{paid,paid_by_odesk}'::text[])))
  • Filter: ((to_timestamp(((source_modified / 1000))::double precision) >= '2019-04-02'::date) AND (to_timestamp(((source_modified / 1000))::double precision) <= '2020-03-08'::date))
250.          

SubPlan (for GroupAggregate)

251. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.56..8.58 rows=1 width=114) (never executed)

252. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_developers_pkey on dim_developers d (cost=0.56..8.58 rows=1 width=114) (never executed)

  • Index Cond: (id = fp2a.developer_id)
253. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=21) (never executed)

254. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=21) (never executed)

255. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp2a.company_id)
256. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c (cost=0.43..8.45 rows=1 width=29) (never executed)

  • Index Cond: (id = t.team_rollup)
257. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=22) (never executed)

258. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=22) (never executed)

259. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp2a.company_id)
260. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_1 (cost=0.43..8.45 rows=1 width=30) (never executed)

  • Index Cond: (id = t_1.team_rollup)
261. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=183) (never executed)

262. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=183) (never executed)

263. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_2 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp2a.company_id)
264. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies c_2 (cost=0.43..8.45 rows=1 width=191) (never executed)

  • Index Cond: (id = t_2.team_rollup)
265. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.43..8.45 rows=1 width=21) (never executed)

266. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies t_3 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp2a.company_id)
267. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp2a.agency_id)
268. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.87..16.92 rows=1 width=20) (never executed)

269. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.87..16.92 rows=1 width=20) (never executed)

270. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (id = fp2a.agency_id)
271. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_companies_pkey on dim_companies agc (cost=0.43..8.45 rows=1 width=28) (never executed)

  • Index Cond: (id = ag_1.company_ref)
272. 0.000 0.000 ↓ 0.0 0

Index Scan using dim_agencies_pkey on dim_agencies ag_2 (cost=0.43..8.45 rows=1 width=21) (never executed)

  • Index Cond: (id = fp2a.agency_id)