explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bq57

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 472.129 ↑ 4.0 1 1

Subquery Scan on report_items_live (cost=597,399.26..597,399.64 rows=4 width=140) (actual time=472.129..472.129 rows=1 loops=1)

  • Buffers: shared hit=10211
2. 0.009 472.128 ↑ 4.0 1 1

GroupAggregate (cost=597,399.26..597,399.60 rows=4 width=196) (actual time=472.128..472.128 rows=1 loops=1)

  • Group Key: items.account_id, items.project_id, items.project_plan_id, items.epic_id, items.activity_id, items.user_id, items.date, items.value, items.reportable_type, items.reportable_id, items.plan_row_uuid, ""*SELECT* 1"".currency, (COALESCE(exchange_rates_by_months.rate, '1'::double precision)), ""*SELECT* 1"".value, items.cost, (COALESCE(cost_exchange_rates.rate, '1'::double precision)), (COALESCE(original_exchange_rates.rate, '1'::double precision)), (GREATEST(items.updated_at, ""*SELECT* 1"".updated_at, ""*SELECT* 1"".rate_card_updated_at))
  • Buffers: shared hit=10211
3. 0.016 472.119 ↑ 4.0 1 1

Sort (cost=597,399.26..597,399.27 rows=4 width=192) (actual time=472.119..472.119 rows=1 loops=1)

  • Sort Key: items.account_id, items.project_id, items.project_plan_id, items.epic_id, items.activity_id, items.user_id, items.date, items.value, items.plan_row_uuid, ""*SELECT* 1"".currency, (COALESCE(exchange_rates_by_months.rate, '1'::double precision)), ""*SELECT* 1"".value, items.cost, (COALESCE(cost_exchange_rates.rate, '1'::double precision)), (COALESCE(original_exchange_rates.rate, '1'::double precision)), (GREATEST(items.updated_at, ""*SELECT* 1"".updated_at, ""*SELECT* 1"".rate_card_updated_at))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=10211
4. 0.018 472.103 ↑ 4.0 1 1

Hash Join (cost=547,767.91..597,399.22 rows=4 width=192) (actual time=337.336..472.103 rows=1 loops=1)

  • Hash Cond: (items.account_id = accounts.id)
  • Buffers: shared hit=10211
5. 0.004 471.962 ↑ 4.0 1 1

Nested Loop Left Join (cost=547,749.24..597,380.52 rows=4 width=184) (actual time=337.196..471.962 rows=1 loops=1)

  • Buffers: shared hit=10200
6. 0.004 471.951 ↑ 1.0 1 1

Nested Loop Left Join (cost=547,744.80..597,363.85 rows=1 width=692) (actual time=337.185..471.951 rows=1 loops=1)

  • Buffers: shared hit=10197
7. 0.013 471.940 ↑ 1.0 1 1

Nested Loop Left Join (cost=547,740.35..597,347.18 rows=1 width=684) (actual time=337.175..471.940 rows=1 loops=1)

  • Buffers: shared hit=10194
8. 22.710 471.909 ↑ 1.0 1 1

Nested Loop Left Join (cost=547,735.90..597,330.51 rows=1 width=676) (actual time=337.145..471.909 rows=1 loops=1)

  • Join Filter: ((items.date >= "*SELECT* 1".start_date) AND ((items.date <= "*SELECT* 1".end_date) OR ("*SELECT* 1".end_date IS NULL)) AND ("*SELECT* 1".project_id = items.project_id) AND ("*SELECT* 1".activity_id = items.activity_id))
  • Rows Removed by Join Filter: 263032
  • Buffers: shared hit=10191
9. 0.012 198.764 ↑ 1.0 1 1

Nested Loop Left Join (cost=547,435.02..569,663.85 rows=1 width=648) (actual time=195.814..198.764 rows=1 loops=1)

  • Buffers: shared hit=1511
10. 0.002 198.742 ↑ 1.0 1 1

Subquery Scan on items (cost=547,430.73..569,655.24 rows=1 width=644) (actual time=195.793..198.742 rows=1 loops=1)

  • Filter: (items.reportable_type = 'TimeLog'::text)
  • Buffers: shared hit=1509
11. 0.002 198.740 ↑ 2.0 1 1

Append (cost=547,430.73..569,655.21 rows=2 width=644) (actual time=195.792..198.740 rows=1 loops=1)

  • Buffers: shared hit=1509
12. 0.028 198.729 ↑ 1.0 1 1

Hash Left Join (cost=547,430.73..568,647.84 rows=1 width=103) (actual time=195.791..198.729 rows=1 loops=1)

  • Hash Cond: (items_1.project_plan_id = pa.project_plan_id)
  • Join Filter: ((items_1.date >= pa.start_date) AND (items_1.date <= pa.end_date) AND ((pa.plan_row_uuid = items_1.plan_row_uuid) OR (items_1.plan_row_uuid IS NULL)) AND ((pa.user_id = items_1.user_id) OR (items_1.user_id IS NULL)) AND ((pa.epic_id = items_1.epic_id) OR ((items_1.reportable_type = 'PlanItem'::text) AND (items_1.epic_id IS NULL)) OR ((items_1.reportable_type = 'TimeLog'::text) AND (pa.epic_id IS NULL))))
  • Rows Removed by Join Filter: 30
  • Buffers: shared hit=1507
13. 0.006 15.691 ↑ 1.0 1 1

Nested Loop Left Join (cost=538,107.82..559,323.59 rows=1 width=149) (actual time=12.763..15.691 rows=1 loops=1)

  • Filter: ((items_1.vacation_hours IS NULL) OR (items_1.vacation_hours < (COALESCE(staff_membership_activity_links.capacity, accounts_1.default_capacity))::double precision))
  • Buffers: shared hit=518
14. 0.041 15.674 ↑ 2.0 1 1

Merge Left Join (cost=538,107.67..559,323.21 rows=2 width=144) (actual time=12.746..15.674 rows=1 loops=1)

  • Merge Cond: (projects.account_id = staff_memberships_1.account_id)
  • Join Filter: ((items_1.date >= (COALESCE(staff_membership_activity_links.start_date, staff_memberships_1.joined_at))) AND (items_1.date <= (COALESCE(lag((staff_membership_activity_links.start_date - 1), 1) OVER (?), staff_memberships_1.archived_at, '3000-01-01'::date))) AND (staff_memberships_1.user_id = items_1.user_id))
  • Rows Removed by Join Filter: 194
  • Buffers: shared hit=516
15. 2.192 3.167 ↑ 2.0 1 1

Nested Loop (cost=537,260.53..558,369.21 rows=2 width=120) (actual time=0.274..3.167 rows=1 loops=1)

  • Join Filter: (items_1.project_id = projects.id)
  • Rows Removed by Join Filter: 5811
  • Buffers: shared hit=431
16. 0.975 0.975 ↑ 1.0 5,812 1

Index Scan using index_projects_on_account_id on projects (cost=0.28..525.16 rows=5,812 width=8) (actual time=0.013..0.975 rows=5,812 loops=1)

  • Buffers: shared hit=417
17. 0.000 0.000 ↑ 2.0 1 5,812

Materialize (cost=537,260.24..557,669.69 rows=2 width=116) (actual time=0.000..0.000 rows=1 loops=5,812)

  • Buffers: shared hit=14
18. 0.002 0.068 ↑ 2.0 1 1

Subquery Scan on items_1 (cost=537,260.24..557,669.68 rows=2 width=116) (actual time=0.064..0.068 rows=1 loops=1)

  • Buffers: shared hit=14
19. 0.001 0.066 ↑ 2.0 1 1

Append (cost=537,260.24..557,669.66 rows=2 width=120) (actual time=0.062..0.066 rows=1 loops=1)

  • Buffers: shared hit=14
20. 0.000 0.025 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1_1 (cost=537,260.24..557,652.56 rows=1 width=120) (actual time=0.025..0.025 rows=0 loops=1)

  • Buffers: shared hit=2
21. 0.001 0.025 ↓ 0.0 0 1

Nested Loop Left Join (cost=537,260.24..557,652.54 rows=1 width=138) (actual time=0.025..0.025 rows=0 loops=1)

  • Join Filter: (nw_intervals_by_dates_roles.office_id = clients.office_id)
  • Filter: (COALESCE(non_working_intervals_by_dates.id, nw_intervals_by_dates_roles.id) IS NULL)
  • Buffers: shared hit=2
22. 0.000 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=537,259.83..555,975.09 rows=25 width=110) (actual time=0.024..0.024 rows=0 loops=1)

  • Join Filter: (generate_series.generate_series = non_working_intervals_by_dates.date)
  • Buffers: shared hit=2
23. 0.014 0.024 ↓ 0.0 0 1

Hash Right Join (cost=537,259.41..555,947.31 rows=25 width=106) (actual time=0.024..0.024 rows=0 loops=1)

  • Hash Cond: ((staff_memberships.account_id = projects_1.account_id) AND (staff_memberships.user_id = plan_rows.user_id))
  • Join Filter: (generate_series.generate_series = ((generate_series_1.generate_series)::date))
  • Buffers: shared hit=2
24. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=537,214.32..545,839.32 rows=575,000 width=52) (never executed)

  • Group Key: generate_series_1.generate_series, staff_memberships.user_id, staff_memberships.account_id
25. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=138.05..493,700.50 rows=4,351,382 width=21) (never executed)

  • Hash Cond: (vacations.staff_membership_id = staff_memberships.id)
  • Join Filter: ((generate_series_1.generate_series >= staff_memberships.joined_at) AND ((staff_memberships.archived_at IS NULL) OR (generate_series_1.generate_series <= staff_memberships.archived_at)))
26. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.01..436,340.93 rows=21,792,000 width=17) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Seq Scan on vacations (cost=0.00..500.92 rows=21,792 width=17) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Function Scan on generate_series generate_series_1 (cost=0.01..10.01 rows=1,000 width=8) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Hash (cost=88.02..88.02 rows=4,002 width=20) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Seq Scan on staff_memberships (cost=0.00..88.02 rows=4,002 width=20) (never executed)

31. 0.000 0.010 ↓ 0.0 0 1

Hash (cost=44.72..44.72 rows=25 width=70) (actual time=0.010..0.010 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
32. 0.001 0.010 ↓ 0.0 0 1

Nested Loop (cost=1.43..44.72 rows=25 width=70) (actual time=0.010..0.010 rows=0 loops=1)

  • Buffers: shared hit=2
33. 0.000 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.42..25.71 rows=1 width=70) (actual time=0.009..0.009 rows=0 loops=1)

  • Buffers: shared hit=2
34. 0.000 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.15..25.40 rows=1 width=70) (actual time=0.009..0.009 rows=0 loops=1)

  • Buffers: shared hit=2
35. 0.001 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..24.93 rows=1 width=62) (actual time=0.009..0.009 rows=0 loops=1)

  • Buffers: shared hit=2
36. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=0.58..16.63 rows=1 width=58) (actual time=0.008..0.008 rows=0 loops=1)

  • Buffers: shared hit=2
37. 0.008 0.008 ↓ 0.0 0 1

Index Scan using plan_items_pkey on plan_items (cost=0.29..8.31 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (id = 1245749)
  • Filter: (utilization > '0'::numeric)
  • Buffers: shared hit=2
38. 0.000 0.000 ↓ 0.0 0

Index Scan using index_plan_rows_on_uuid on plan_rows (cost=0.29..8.31 rows=1 width=28) (never executed)

  • Index Cond: (uuid = plan_items.plan_row_uuid)
  • Filter: ((user_id IS NOT NULL) OR (activity_id IS NOT NULL))
39. 0.000 0.000 ↓ 0.0 0

Index Scan using project_plans_pkey on project_plans (cost=0.28..8.30 rows=1 width=8) (never executed)

  • Index Cond: (id = plan_items.project_plan_id)
  • Filter: active
40. 0.000 0.000 ↓ 0.0 0

Index Scan using projects_pkey on projects projects_1 (cost=0.28..0.46 rows=1 width=12) (never executed)

  • Index Cond: (project_plans.project_id = id)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using clients_pkey on clients (cost=0.28..0.32 rows=1 width=8) (never executed)

  • Index Cond: (projects_1.client_id = id)
42. 0.000 0.000 ↓ 0.0 0

Function Scan on generate_series (cost=0.01..18.76 rows=25 width=8) (never executed)

  • Filter: (date_part('dow'::text, generate_series) = ANY ('{1,2,3,4,5}'::double precision[]))
43. 0.000 0.000 ↓ 0.0 0

Index Scan using non_working_intervals_by_dates_idx on non_working_intervals_by_dates (cost=0.41..1.09 rows=2 width=16) (never executed)

  • Index Cond: ((projects_1.account_id = account_id) AND (user_id = plan_rows.user_id))
44. 0.000 0.000 ↓ 0.0 0

Index Scan using non_working_intervals_by_dates_idx on non_working_intervals_by_dates nw_intervals_by_dates_roles (cost=0.41..66.96 rows=11 width=16) (never executed)

  • Index Cond: ((projects_1.account_id = account_id) AND (generate_series.generate_series = date))
45. 0.004 0.040 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.99..17.08 rows=1 width=120) (actual time=0.037..0.040 rows=1 loops=1)

  • Join Filter: (epics.project_plan_id IS NULL)
  • Buffers: shared hit=12
46. 0.004 0.025 ↑ 1.0 1 1

Nested Loop (cost=0.71..16.75 rows=1 width=36) (actual time=0.024..0.025 rows=1 loops=1)

  • Buffers: shared hit=7
47. 0.009 0.009 ↑ 1.0 1 1

Index Scan using time_logs_pkey on time_logs (cost=0.42..8.44 rows=1 width=28) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = 1245749)
  • Buffers: shared hit=4
48. 0.012 0.012 ↑ 1.0 1 1

Index Scan using epics_pkey on epics (cost=0.29..8.30 rows=1 width=12) (actual time=0.012..0.012 rows=1 loops=1)

  • Index Cond: (id = time_logs.epic_id)
  • Buffers: shared hit=3
49. 0.011 0.011 ↑ 1.0 1 1

Index Scan using index_project_plans_on_project_id on project_plans general_epic_plans (cost=0.28..0.32 rows=1 width=8) (actual time=0.008..0.011 rows=1 loops=1)

  • Index Cond: (project_id = epics.project_id)
  • Filter: active
  • Rows Removed by Filter: 3
  • Buffers: shared hit=5
50. 0.032 12.466 ↑ 21.7 196 1

Materialize (cost=847.14..942.74 rows=4,249 width=40) (actual time=12.375..12.466 rows=196 loops=1)

  • Buffers: shared hit=85
51. 0.044 12.434 ↑ 21.7 196 1

Unique (cost=847.14..889.63 rows=4,249 width=65) (actual time=12.373..12.434 rows=196 loops=1)

  • Buffers: shared hit=85
52. 2.852 12.390 ↑ 21.6 197 1

Sort (cost=847.14..857.76 rows=4,249 width=65) (actual time=12.372..12.390 rows=197 loops=1)

  • Sort Key: staff_memberships_1.account_id, staff_memberships_1.user_id, (COALESCE(staff_membership_activity_links.start_date, staff_memberships_1.joined_at)), (COALESCE(lag((staff_membership_activity_links.start_date - 1), 1) OVER (?), staff_memberships_1.archived_at, '3000-01-01'::date)) DESC
  • Sort Method: quicksort Memory: 790kB
  • Buffers: shared hit=85
53. 3.226 9.538 ↑ 1.0 4,249 1

WindowAgg (cost=484.85..591.08 rows=4,249 width=65) (actual time=5.946..9.538 rows=4,249 loops=1)

  • Buffers: shared hit=85
54. 2.481 6.312 ↑ 1.0 4,249 1

Sort (cost=484.85..495.47 rows=4,249 width=56) (actual time=5.936..6.312 rows=4,249 loops=1)

  • Sort Key: staff_membership_activity_links.staff_membership_id, staff_membership_activity_links.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 790kB
  • Buffers: shared hit=85
55. 1.564 3.831 ↑ 1.0 4,249 1

Hash Join (cost=138.05..228.79 rows=4,249 width=56) (actual time=1.849..3.831 rows=4,249 loops=1)

  • Hash Cond: (staff_membership_activity_links.staff_membership_id = staff_memberships_1.id)
  • Buffers: shared hit=85
56. 0.440 0.440 ↑ 1.0 4,256 1

Seq Scan on staff_membership_activity_links (cost=0.00..79.56 rows=4,256 width=28) (actual time=0.007..0.440 rows=4,256 loops=1)

  • Buffers: shared hit=37
57. 0.948 1.827 ↑ 1.0 4,002 1

Hash (cost=88.02..88.02 rows=4,002 width=32) (actual time=1.827..1.827 rows=4,002 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 276kB
  • Buffers: shared hit=48
58. 0.879 0.879 ↑ 1.0 4,002 1

Seq Scan on staff_memberships staff_memberships_1 (cost=0.00..88.02 rows=4,002 width=32) (actual time=0.006..0.879 rows=4,002 loops=1)

  • Buffers: shared hit=48
59. 0.011 0.011 ↑ 1.0 1 1

Index Scan using accounts_pkey on accounts accounts_1 (cost=0.15..0.17 rows=1 width=9) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: (id = projects.account_id)
  • Buffers: shared hit=2
60. 11.831 183.010 ↓ 8.9 44,428 1

Hash (cost=9,260.77..9,260.77 rows=4,971 width=48) (actual time=183.010..183.010 rows=44,428 loops=1)

  • Buckets: 65536 (originally 8192) Batches: 1 (originally 1) Memory Usage: 3912kB
  • Buffers: shared hit=989
61. 6.396 171.179 ↓ 8.9 44,428 1

Subquery Scan on pa (cost=9,136.50..9,260.77 rows=4,971 width=48) (actual time=126.414..171.179 rows=44,428 loops=1)

  • Buffers: shared hit=989
62. 66.631 164.783 ↓ 8.9 44,428 1

HashAggregate (cost=9,136.50..9,211.06 rows=4,971 width=48) (actual time=126.412..164.783 rows=44,428 loops=1)

  • Group Key: plan_rows_1.project_plan_id, plan_rows_1.epic_id, plan_rows_1.user_id, plan_roles.activity_id, COALESCE(plan_roles.start_date, '1980-01-01'::date), COALESCE(lag((plan_roles.start_date - 1), 1) OVER (?), '3000-01-01'::date)
  • Buffers: shared hit=989
63. 28.809 98.152 ↑ 1.0 44,581 1

WindowAgg (cost=6,572.98..7,576.09 rows=44,583 width=68) (actual time=63.426..98.152 rows=44,581 loops=1)

  • Buffers: shared hit=989
64. 27.584 69.343 ↑ 1.0 44,581 1

Sort (cost=6,572.98..6,684.43 rows=44,583 width=60) (actual time=63.412..69.343 rows=44,581 loops=1)

  • Sort Key: plan_roles.plan_row_uuid, plan_roles.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 7154kB
  • Buffers: shared hit=989
65. 17.945 41.759 ↑ 1.0 44,581 1

Hash Join (cost=1,631.38..3,130.23 rows=44,583 width=60) (actual time=19.773..41.759 rows=44,581 loops=1)

  • Hash Cond: (plan_roles.plan_row_uuid = plan_rows_1.uuid)
  • Buffers: shared hit=989
66. 4.355 4.355 ↑ 1.0 44,583 1

Seq Scan on plan_roles (cost=0.00..885.83 rows=44,583 width=32) (actual time=0.010..4.355 rows=44,583 loops=1)

  • Buffers: shared hit=440
67. 10.709 19.459 ↑ 1.0 48,106 1

Hash (cost=1,030.06..1,030.06 rows=48,106 width=28) (actual time=19.459..19.459 rows=48,106 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3180kB
  • Buffers: shared hit=549
68. 8.750 8.750 ↑ 1.0 48,106 1

Seq Scan on plan_rows plan_rows_1 (cost=0.00..1,030.06 rows=48,106 width=28) (actual time=0.007..8.750 rows=48,106 loops=1)

  • Buffers: shared hit=549
69. 0.000 0.009 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=837.79..1,007.35 rows=1 width=103) (actual time=0.009..0.009 rows=0 loops=1)

  • Buffers: shared hit=2
70. 0.001 0.009 ↓ 0.0 0 1

Nested Loop Semi Join (cost=837.79..1,007.34 rows=1 width=110) (actual time=0.008..0.009 rows=0 loops=1)

  • Join Filter: (staff_membership_activity_links_1.id = staff_activities_with_dates.link_id)
  • Buffers: shared hit=2
71. 0.000 0.008 ↓ 0.0 0 1

Nested Loop (cost=1.27..37.45 rows=1 width=68) (actual time=0.008..0.008 rows=0 loops=1)

  • Buffers: shared hit=2
72. 0.008 0.008 ↓ 0.0 0 1

Index Scan using vacations_pkey on vacations vacations_1 (cost=0.29..8.30 rows=1 width=44) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (id = 1245749)
  • Buffers: shared hit=2
73. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.98..29.13 rows=1 width=44) (never executed)

74. 0.000 0.000 ↓ 0.0 0

Index Scan using index_staff_membership_activity_links_on_staff_membership_id on staff_membership_activity_links staff_membership_activity_links_1 (cost=0.28..8.30 rows=1 width=20) (never executed)

  • Index Cond: (staff_membership_id = vacations_1.staff_membership_id)
75. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.70..20.82 rows=1 width=24) (never executed)

  • Join Filter: (generate_series_2.generate_series = non_working_intervals_by_dates_1.date)
  • Filter: (non_working_intervals_by_dates_1.id IS NULL)
76. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..19.42 rows=1 width=24) (never executed)

  • Join Filter: (vacations_1.staff_membership_id = staff_memberships_2.id)
77. 0.000 0.000 ↓ 0.0 0

Index Scan using memberships_pkey on staff_memberships staff_memberships_2 (cost=0.28..0.35 rows=1 width=16) (never executed)

  • Index Cond: (id = staff_membership_activity_links_1.staff_membership_id)
78. 0.000 0.000 ↓ 0.0 0

Function Scan on generate_series generate_series_2 (cost=0.01..18.76 rows=25 width=8) (never executed)

  • Filter: (date_part('dow'::text, generate_series) = ANY ('{1,2,3,4,5}'::double precision[]))
79. 0.000 0.000 ↓ 0.0 0

Index Scan using non_working_intervals_by_dates_idx on non_working_intervals_by_dates non_working_intervals_by_dates_1 (cost=0.41..1.37 rows=2 width=16) (never executed)

  • Index Cond: ((staff_memberships_2.account_id = account_id) AND (user_id = staff_memberships_2.user_id))
80. 0.000 0.000 ↓ 0.0 0

Subquery Scan on staff_activities_with_dates (cost=836.52..963.99 rows=472 width=4) (never executed)

  • Filter: ((CURRENT_DATE >= staff_activities_with_dates.start_date) AND (CURRENT_DATE <= staff_activities_with_dates.end_date))
81. 0.000 0.000 ↓ 0.0 0

Unique (cost=836.52..879.01 rows=4,249 width=613) (never executed)

82. 0.000 0.000 ↓ 0.0 0

Sort (cost=836.52..847.14 rows=4,249 width=613) (never executed)

  • Sort Key: staff_memberships_3.account_id, staff_memberships_3.user_id, (COALESCE(staff_membership_activity_links_2.start_date, staff_memberships_3.joined_at)), (COALESCE(lag((staff_membership_activity_links_2.start_date - 1), 1) OVER (?), staff_memberships_3.archived_at, '3000-01-01'::date)) DESC
83. 0.000 0.000 ↓ 0.0 0

WindowAgg (cost=484.85..580.45 rows=4,249 width=613) (never executed)

84. 0.000 0.000 ↓ 0.0 0

Sort (cost=484.85..495.47 rows=4,249 width=28) (never executed)

  • Sort Key: staff_membership_activity_links_2.staff_membership_id, staff_membership_activity_links_2.start_date DESC NULLS LAST
85. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=138.05..228.79 rows=4,249 width=28) (never executed)

  • Hash Cond: (staff_membership_activity_links_2.staff_membership_id = staff_memberships_3.id)
86. 0.000 0.000 ↓ 0.0 0

Seq Scan on staff_membership_activity_links staff_membership_activity_links_2 (cost=0.00..79.56 rows=4,256 width=12) (never executed)

87. 0.000 0.000 ↓ 0.0 0

Hash (cost=88.02..88.02 rows=4,002 width=20) (never executed)

88. 0.000 0.000 ↓ 0.0 0

Seq Scan on staff_memberships staff_memberships_3 (cost=0.00..88.02 rows=4,002 width=20) (never executed)

89. 0.002 0.010 ↓ 0.0 0 1

Bitmap Heap Scan on discounts (cost=4.30..8.60 rows=1 width=26) (actual time=0.010..0.010 rows=0 loops=1)

  • Recheck Cond: (project_id = items.project_id)
  • Filter: ((items.date >= start_date) AND (items.date <= end_date) AND (((discountable_type)::text = 'User'::text) OR ((discountable_type)::text = 'Epic'::text)) AND (((discountable_id = items.user_id) AND ((discountable_type)::text = 'User'::text)) OR ((discountable_id = items.epic_id) AND ((discountable_type)::text = 'Epic'::text))))
  • Buffers: shared hit=2
90. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on index_discounts_on_project_id (cost=0.00..4.29 rows=3 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (project_id = items.project_id)
  • Buffers: shared hit=2
91. 26.372 250.435 ↑ 1.0 263,033 1

Append (cost=300.88..22,213.28 rows=272,669 width=44) (actual time=1.725..250.435 rows=263,033 loops=1)

  • Buffers: shared hit=8680
92. 0.077 12.830 ↓ 9.7 474 1

Subquery Scan on *SELECT* 1 (cost=300.88..470.62 rows=49 width=44) (actual time=1.725..12.830 rows=474 loops=1)

  • Buffers: shared hit=2602
93. 0.105 12.753 ↓ 9.7 474 1

Merge Join (cost=300.88..470.13 rows=49 width=612) (actual time=1.724..12.753 rows=474 loops=1)

  • Merge Cond: (clients_1.brand_id = brands.id)
  • Buffers: shared hit=2602
94. 0.113 12.599 ↓ 9.7 474 1

Nested Loop (cost=294.80..1,671.71 rows=49 width=52) (actual time=1.673..12.599 rows=474 loops=1)

  • Buffers: shared hit=2601
95. 0.006 1.136 ↓ 5.0 5 1

Merge Join (cost=294.38..294.67 rows=1 width=32) (actual time=1.123..1.136 rows=5 loops=1)

  • Merge Cond: (rate_cards.rateable_id = clients_1.brand_id)
  • Buffers: shared hit=144
96. 0.017 0.526 ↑ 28.8 4 1

WindowAgg (cost=108.61..111.49 rows=115 width=45) (actual time=0.515..0.526 rows=4 loops=1)

  • Buffers: shared hit=44
97. 0.034 0.509 ↑ 23.0 5 1

Sort (cost=108.61..108.90 rows=115 width=29) (actual time=0.509..0.509 rows=5 loops=1)

  • Sort Key: rate_cards.rateable_id, rate_cards.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 33kB
  • Buffers: shared hit=44
98. 0.475 0.475 ↑ 1.0 115 1

Seq Scan on rate_cards (cost=0.00..104.68 rows=115 width=29) (actual time=0.107..0.475 rows=115 loops=1)

  • Filter: ((rateable_type)::text = 'Brand'::text)
  • Rows Removed by Filter: 4739
  • Buffers: shared hit=44
99. 0.005 0.604 ↑ 1.0 5 1

Sort (cost=185.76..185.78 rows=5 width=8) (actual time=0.603..0.604 rows=5 loops=1)

  • Sort Key: clients_1.brand_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=100
100. 0.005 0.599 ↑ 1.0 5 1

Nested Loop (cost=0.56..185.71 rows=5 width=8) (actual time=0.331..0.599 rows=5 loops=1)

  • Buffers: shared hit=100
101. 0.008 0.579 ↑ 1.0 5 1

Nested Loop (cost=0.28..184.13 rows=5 width=8) (actual time=0.320..0.579 rows=5 loops=1)

  • Buffers: shared hit=85
102. 0.561 0.561 ↑ 1.0 5 1

Seq Scan on pricing_models (cost=0.00..142.62 rows=5 width=4) (actual time=0.311..0.561 rows=5 loops=1)

  • Filter: ((rates_type)::text = 'brand'::text)
  • Rows Removed by Filter: 5805
  • Buffers: shared hit=70
103. 0.010 0.010 ↑ 1.0 1 5

Index Scan using projects_pkey on projects projects_2 (cost=0.28..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id = pricing_models.project_id)
  • Buffers: shared hit=15
104. 0.015 0.015 ↑ 1.0 1 5

Index Scan using clients_pkey on clients clients_1 (cost=0.28..0.32 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=5)

  • Index Cond: (id = projects_2.client_id)
  • Buffers: shared hit=15
105. 11.350 11.350 ↓ 1.9 95 5

Index Scan using index_rates_on_activity_id_and_rate_card_id on rates (cost=0.42..1,376.55 rows=49 width=28) (actual time=0.564..2.270 rows=95 loops=5)

  • Index Cond: (rate_card_id = rate_cards.id)
  • Buffers: shared hit=2457
106. 0.033 0.049 ↑ 38.3 3 1

Sort (cost=6.09..6.37 rows=115 width=4) (actual time=0.048..0.049 rows=3 loops=1)

  • Sort Key: brands.id
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=1
107. 0.016 0.016 ↑ 1.0 115 1

Seq Scan on brands (cost=0.00..2.15 rows=115 width=4) (actual time=0.005..0.016 rows=115 loops=1)

  • Buffers: shared hit=1
108. 26.248 82.374 ↓ 2.6 91,600 1

Subquery Scan on *SELECT* 2 (cost=583.00..5,484.31 rows=35,240 width=44) (actual time=10.714..82.374 rows=91,600 loops=1)

  • Buffers: shared hit=2036
109. 35.425 56.126 ↓ 2.6 91,600 1

Hash Join (cost=583.00..5,131.91 rows=35,240 width=612) (actual time=10.714..56.126 rows=91,600 loops=1)

  • Hash Cond: (rates_1.rate_card_id = rate_cards_1.id)
  • Buffers: shared hit=2036
110. 16.150 16.150 ↑ 1.0 174,437 1

Seq Scan on rates rates_1 (cost=0.00..3,542.37 rows=174,437 width=28) (actual time=0.008..16.150 rows=174,437 loops=1)

  • Buffers: shared hit=1798
111. 0.167 4.551 ↑ 1.1 657 1

Hash (cost=574.00..574.00 rows=720 width=24) (actual time=4.551..4.551 rows=657 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 47kB
  • Buffers: shared hit=238
112. 0.149 4.384 ↑ 1.1 657 1

Hash Join (cost=378.98..574.00 rows=720 width=24) (actual time=2.755..4.384 rows=657 loops=1)

  • Hash Cond: (clients_2.office_id = offices.id)
  • Buffers: shared hit=238
113. 0.154 2.914 ↑ 1.0 623 1

Hash Join (cost=214.02..399.80 rows=623 width=8) (actual time=1.430..2.914 rows=623 loops=1)

  • Hash Cond: (projects_3.client_id = clients_2.id)
  • Buffers: shared hit=190
114. 0.780 2.123 ↑ 1.0 623 1

Hash Join (cost=150.41..334.56 rows=623 width=8) (actual time=0.788..2.123 rows=623 loops=1)

  • Hash Cond: (projects_3.id = pricing_models_1.project_id)
  • Buffers: shared hit=168
115. 0.568 0.568 ↑ 1.0 5,812 1

Seq Scan on projects projects_3 (cost=0.00..156.12 rows=5,812 width=8) (actual time=0.004..0.568 rows=5,812 loops=1)

  • Buffers: shared hit=98
116. 0.096 0.775 ↑ 1.0 623 1

Hash (cost=142.62..142.62 rows=623 width=4) (actual time=0.775..0.775 rows=623 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 30kB
  • Buffers: shared hit=70
117. 0.679 0.679 ↑ 1.0 623 1

Seq Scan on pricing_models pricing_models_1 (cost=0.00..142.62 rows=623 width=4) (actual time=0.012..0.679 rows=623 loops=1)

  • Filter: ((rates_type)::text = 'office'::text)
  • Rows Removed by Filter: 5187
  • Buffers: shared hit=70
118. 0.317 0.637 ↑ 1.0 1,849 1

Hash (cost=40.49..40.49 rows=1,849 width=8) (actual time=0.637..0.637 rows=1,849 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 89kB
  • Buffers: shared hit=22
119. 0.320 0.320 ↑ 1.0 1,849 1

Seq Scan on clients clients_2 (cost=0.00..40.49 rows=1,849 width=8) (actual time=0.006..0.320 rows=1,849 loops=1)

  • Buffers: shared hit=22
120. 0.106 1.321 ↑ 1.1 450 1

Hash (cost=158.85..158.85 rows=489 width=28) (actual time=1.321..1.321 rows=450 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
  • Buffers: shared hit=48
121. 0.107 1.215 ↑ 1.1 450 1

Hash Join (cost=140.44..158.85 rows=489 width=28) (actual time=0.778..1.215 rows=450 loops=1)

  • Hash Cond: (rate_cards_1.rateable_id = offices.id)
  • Buffers: shared hit=48
122. 0.308 0.980 ↑ 1.0 489 1

WindowAgg (cost=126.52..138.74 rows=489 width=45) (actual time=0.646..0.980 rows=489 loops=1)

  • Buffers: shared hit=44
123. 0.147 0.672 ↑ 1.0 489 1

Sort (cost=126.52..127.74 rows=489 width=29) (actual time=0.641..0.672 rows=489 loops=1)

  • Sort Key: rate_cards_1.rateable_id, rate_cards_1.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 63kB
  • Buffers: shared hit=44
124. 0.525 0.525 ↑ 1.0 489 1

Seq Scan on rate_cards rate_cards_1 (cost=0.00..104.68 rows=489 width=29) (actual time=0.101..0.525 rows=489 loops=1)

  • Filter: ((rateable_type)::text = 'Office'::text)
  • Rows Removed by Filter: 4365
  • Buffers: shared hit=44
125. 0.073 0.128 ↑ 1.0 441 1

Hash (cost=8.41..8.41 rows=441 width=4) (actual time=0.128..0.128 rows=441 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
  • Buffers: shared hit=4
126. 0.055 0.055 ↑ 1.0 441 1

Seq Scan on offices (cost=0.00..8.41 rows=441 width=4) (actual time=0.006..0.055 rows=441 loops=1)

  • Buffers: shared hit=4
127. 12.382 68.587 ↑ 2.2 94,593 1

Subquery Scan on *SELECT* 3 (cost=840.78..9,363.71 rows=205,419 width=44) (actual time=8.271..68.587 rows=94,593 loops=1)

  • Buffers: shared hit=2032
128. 33.401 56.205 ↑ 2.2 94,593 1

Hash Join (cost=840.78..7,309.52 rows=205,419 width=612) (actual time=8.270..56.205 rows=94,593 loops=1)

  • Hash Cond: (rates_2.rate_card_id = rate_cards_2.id)
  • Buffers: shared hit=2032
129. 14.564 14.564 ↑ 1.0 174,437 1

Seq Scan on rates rates_2 (cost=0.00..3,542.37 rows=174,437 width=28) (actual time=0.008..14.564 rows=174,437 loops=1)

  • Buffers: shared hit=1798
130. 0.753 8.240 ↑ 1.0 4,004 1

Hash (cost=788.31..788.31 rows=4,197 width=24) (actual time=8.240..8.240 rows=4,004 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 299kB
  • Buffers: shared hit=234
131. 0.834 7.487 ↑ 1.0 4,004 1

Hash Join (cost=586.95..788.31 rows=4,197 width=24) (actual time=4.986..7.487 rows=4,004 loops=1)

  • Hash Cond: (projects_4.client_id = clients_3.id)
  • Buffers: shared hit=234
132. 0.899 3.510 ↑ 1.0 3,620 1

Hash Join (cost=228.77..380.91 rows=3,620 width=8) (actual time=1.836..3.510 rows=3,620 loops=1)

  • Hash Cond: (pricing_models_2.project_id = projects_4.id)
  • Buffers: shared hit=168
133. 0.821 0.821 ↑ 1.0 3,621 1

Seq Scan on pricing_models pricing_models_2 (cost=0.00..142.62 rows=3,621 width=4) (actual time=0.007..0.821 rows=3,621 loops=1)

  • Filter: ((rates_type)::text = 'client'::text)
  • Rows Removed by Filter: 2189
  • Buffers: shared hit=70
134. 0.796 1.790 ↑ 1.0 5,812 1

Hash (cost=156.12..156.12 rows=5,812 width=8) (actual time=1.790..1.790 rows=5,812 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 292kB
  • Buffers: shared hit=98
135. 0.994 0.994 ↑ 1.0 5,812 1

Seq Scan on projects projects_4 (cost=0.00..156.12 rows=5,812 width=8) (actual time=0.005..0.994 rows=5,812 loops=1)

  • Buffers: shared hit=98
136. 0.357 3.143 ↑ 1.0 1,820 1

Hash (cost=335.42..335.42 rows=1,821 width=28) (actual time=3.143..3.143 rows=1,820 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 123kB
  • Buffers: shared hit=66
137. 0.351 2.786 ↑ 1.0 1,820 1

Hash Join (cost=266.89..335.42 rows=1,821 width=28) (actual time=1.421..2.786 rows=1,820 loops=1)

  • Hash Cond: (rate_cards_2.rateable_id = clients_3.id)
  • Buffers: shared hit=66
138. 0.925 2.017 ↑ 1.0 1,821 1

WindowAgg (cost=203.29..248.81 rows=1,821 width=45) (actual time=0.998..2.017 rows=1,821 loops=1)

  • Buffers: shared hit=44
139. 0.551 1.092 ↑ 1.0 1,821 1

Sort (cost=203.29..207.84 rows=1,821 width=29) (actual time=0.990..1.092 rows=1,821 loops=1)

  • Sort Key: rate_cards_2.rateable_id, rate_cards_2.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 191kB
  • Buffers: shared hit=44
140. 0.541 0.541 ↑ 1.0 1,821 1

Seq Scan on rate_cards rate_cards_2 (cost=0.00..104.68 rows=1,821 width=29) (actual time=0.006..0.541 rows=1,821 loops=1)

  • Filter: ((rateable_type)::text = 'Client'::text)
  • Rows Removed by Filter: 3033
  • Buffers: shared hit=44
141. 0.223 0.418 ↑ 1.0 1,849 1

Hash (cost=40.49..40.49 rows=1,849 width=4) (actual time=0.418..0.418 rows=1,849 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 82kB
  • Buffers: shared hit=22
142. 0.195 0.195 ↑ 1.0 1,849 1

Seq Scan on clients clients_3 (cost=0.00..40.49 rows=1,849 width=4) (actual time=0.006..0.195 rows=1,849 loops=1)

  • Buffers: shared hit=22
143. 9.611 60.272 ↓ 2.4 76,366 1

Subquery Scan on *SELECT* 4 (cost=695.56..5,531.29 rows=31,961 width=44) (actual time=5.864..60.272 rows=76,366 loops=1)

  • Buffers: shared hit=2010
144. 30.014 50.661 ↓ 2.4 76,366 1

Hash Join (cost=695.56..5,211.68 rows=31,961 width=612) (actual time=5.863..50.661 rows=76,366 loops=1)

  • Hash Cond: (rates_3.rate_card_id = rate_cards_3.id)
  • Buffers: shared hit=2010
145. 14.815 14.815 ↑ 1.0 174,437 1

Seq Scan on rates rates_3 (cost=0.00..3,542.37 rows=174,437 width=28) (actual time=0.012..14.815 rows=174,437 loops=1)

  • Buffers: shared hit=1798
146. 0.302 5.832 ↓ 2.4 1,591 1

Hash (cost=687.40..687.40 rows=653 width=24) (actual time=5.832..5.832 rows=1,591 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
  • Buffers: shared hit=212
147. 0.783 5.530 ↓ 2.4 1,591 1

Hash Join (cost=502.95..687.40 rows=653 width=24) (actual time=4.258..5.530 rows=1,591 loops=1)

  • Hash Cond: (projects_5.id = pricing_models_3.project_id)
  • Buffers: shared hit=212
148. 0.502 0.502 ↑ 1.0 5,812 1

Seq Scan on projects projects_5 (cost=0.00..156.12 rows=5,812 width=4) (actual time=0.005..0.502 rows=5,812 loops=1)

  • Buffers: shared hit=98
149. 0.294 4.245 ↓ 2.4 1,591 1

Hash (cost=494.79..494.79 rows=653 width=24) (actual time=4.245..4.245 rows=1,591 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 110kB
  • Buffers: shared hit=114
150. 0.398 3.951 ↓ 2.4 1,591 1

Hash Join (cost=403.40..494.79 rows=653 width=24) (actual time=2.171..3.951 rows=1,591 loops=1)

  • Hash Cond: (rate_cards_3.rateable_id = pricing_models_3.id)
  • Buffers: shared hit=114
151. 1.267 2.653 ↑ 1.0 2,429 1

WindowAgg (cost=241.26..301.98 rows=2,429 width=45) (actual time=1.263..2.653 rows=2,429 loops=1)

  • Buffers: shared hit=44
152. 0.792 1.386 ↑ 1.0 2,429 1

Sort (cost=241.26..247.33 rows=2,429 width=29) (actual time=1.255..1.386 rows=2,429 loops=1)

  • Sort Key: rate_cards_3.rateable_id, rate_cards_3.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 286kB
  • Buffers: shared hit=44
153. 0.594 0.594 ↑ 1.0 2,429 1

Seq Scan on rate_cards rate_cards_3 (cost=0.00..104.68 rows=2,429 width=29) (actual time=0.007..0.594 rows=2,429 loops=1)

  • Filter: ((rateable_type)::text = 'PricingModel'::text)
  • Rows Removed by Filter: 2425
  • Buffers: shared hit=44
154. 0.219 0.900 ↑ 1.0 1,561 1

Hash (cost=142.62..142.62 rows=1,561 width=8) (actual time=0.900..0.900 rows=1,561 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 77kB
  • Buffers: shared hit=70
155. 0.681 0.681 ↑ 1.0 1,561 1

Seq Scan on pricing_models pricing_models_3 (cost=0.00..142.62 rows=1,561 width=8) (actual time=0.008..0.681 rows=1,561 loops=1)

  • Filter: ((rates_type)::text = 'custom'::text)
  • Rows Removed by Filter: 4249
  • Buffers: shared hit=70
156. 0.006 0.018 ↑ 4.0 1 1

Bitmap Heap Scan on exchange_rates_by_months (cost=4.45..16.63 rows=4 width=24) (actual time=0.018..0.018 rows=1 loops=1)

  • Recheck Cond: ((account_id = items.account_id) AND ((currency)::text = ("*SELECT* 1".currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Heap Blocks: exact=1
  • Buffers: shared hit=3
157. 0.012 0.012 ↑ 4.0 1 1

Bitmap Index Scan on exchange_rates_by_months_idx (cost=0.00..4.45 rows=4 width=0) (actual time=0.012..0.012 rows=1 loops=1)

  • Index Cond: ((account_id = items.account_id) AND ((currency)::text = ("*SELECT* 1".currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Buffers: shared hit=2
158. 0.002 0.007 ↑ 4.0 1 1

Bitmap Heap Scan on exchange_rates_by_months original_exchange_rates (cost=4.45..16.63 rows=4 width=24) (actual time=0.007..0.007 rows=1 loops=1)

  • Recheck Cond: ((account_id = items.account_id) AND ((currency)::text = ("*SELECT* 1".currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Heap Blocks: exact=1
  • Buffers: shared hit=3
159. 0.005 0.005 ↑ 4.0 1 1

Bitmap Index Scan on exchange_rates_by_months_idx (cost=0.00..4.45 rows=4 width=0) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: ((account_id = items.account_id) AND ((currency)::text = ("*SELECT* 1".currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Buffers: shared hit=2
160. 0.002 0.007 ↑ 4.0 1 1

Bitmap Heap Scan on exchange_rates_by_months cost_exchange_rates (cost=4.45..16.63 rows=4 width=24) (actual time=0.007..0.007 rows=1 loops=1)

  • Recheck Cond: ((account_id = items.account_id) AND ((currency)::text = (items.cost_currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Heap Blocks: exact=1
  • Buffers: shared hit=3
161. 0.005 0.005 ↑ 4.0 1 1

Bitmap Index Scan on exchange_rates_by_months_idx (cost=0.00..4.45 rows=4 width=0) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: ((account_id = items.account_id) AND ((currency)::text = (items.cost_currency)::text) AND (start_date <= items.date) AND (end_date >= items.date))
  • Buffers: shared hit=2
162. 0.004 0.123 ↑ 9.8 12 1

Hash (cost=17.20..17.20 rows=118 width=4) (actual time=0.123..0.123 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=11
163. 0.119 0.119 ↑ 9.8 12 1

Seq Scan on accounts (cost=0.00..17.20 rows=118 width=4) (actual time=0.013..0.119 rows=12 loops=1)

  • Filter: ((suspended_at)::date >= CURRENT_DATE)
  • Rows Removed by Filter: 342
  • Buffers: shared hit=11
Planning time : 10.557 ms
Execution time : 490.346 ms