explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WJfR

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 24,563.404 ↑ 1.0 1 1

Aggregate (cost=9,340,724.12..9,340,724.13 rows=1 width=32) (actual time=24,563.404..24,563.404 rows=1 loops=1)

2. 0.011 24,563.349 ↑ 56.5 4 1

Subquery Scan on t (cost=9,340,459.13..9,340,723.55 rows=226 width=80) (actual time=24,563.043..24,563.349 rows=4 loops=1)

3. 2.143 24,563.338 ↑ 56.5 4 1

GroupAggregate (cost=9,340,459.13..9,340,721.29 rows=226 width=109) (actual time=24,563.037..24,563.338 rows=4 loops=1)

  • Group Key: projects.id, ""*SELECT* 1_1"".project_plan_id, ""*SELECT* 1_1"".user_id, (COALESCE(""*SELECT* 1_1"".activity_id, sa.activity_id)), ""*SELECT* 1_1"".epic_id, ('PlanItem'::text), ""*SELECT* 1"".currency, ((""*SELECT* 1_1"".date < CURRENT_DATE)), (date_trunc('month'::text, (""*SELECT* 1_1"".date)::timestamp with time zone))
4.          

CTE projects_with_permissions

5. 0.005 0.035 ↑ 2.0 1 1

GroupAggregate (cost=16.65..16.68 rows=2 width=36) (actual time=0.035..0.035 rows=1 loops=1)

  • Group Key: projects_6.id
6. 0.009 0.030 ↑ 1.0 2 1

Sort (cost=16.65..16.65 rows=2 width=36) (actual time=0.030..0.030 rows=2 loops=1)

  • Sort Key: projects_6.id
  • Sort Method: quicksort Memory: 25kB
7. 0.001 0.021 ↑ 1.0 2 1

Append (cost=0.28..16.64 rows=2 width=36) (actual time=0.013..0.021 rows=2 loops=1)

8. 0.013 0.013 ↑ 1.0 1 1

Index Scan using projects_pkey on projects projects_6 (cost=0.28..8.30 rows=1 width=36) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (id = 104)
  • Filter: (account_id = 15)
9. 0.007 0.007 ↑ 1.0 1 1

Index Scan using projects_pkey on projects projects_7 (cost=0.28..8.30 rows=1 width=36) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (id = 104)
  • Filter: (account_id = 15)
10. 0.029 24,561.195 ↑ 56.5 4 1

Sort (cost=9,340,442.44..9,340,443.01 rows=226 width=161) (actual time=24,561.193..24,561.195 rows=4 loops=1)

  • Sort Key: projects.id, ""*SELECT* 1_1"".project_plan_id, ""*SELECT* 1_1"".user_id, (COALESCE(""*SELECT* 1_1"".activity_id, sa.activity_id)), ""*SELECT* 1_1"".epic_id, ('PlanItem'::text), ""*SELECT* 1"".currency, ((""*SELECT* 1_1"".date < CURRENT_DATE)), (date_trunc('month'::text, (""*SELECT* 1_1"".date)::timestamp with time zone))
  • Sort Method: quicksort Memory: 26kB
11. 26.290 24,561.166 ↑ 56.5 4 1

Hash Left Join (cost=1,716,729.71..9,340,433.61 rows=226 width=161) (actual time=24,547.314..24,561.166 rows=4 loops=1)

  • Hash Cond: ((projects.id = ""*SELECT* 1"".project_id) AND ((COALESCE(""*SELECT* 1_1"".activity_id, sa.activity_id)) = ""*SELECT* 1"".activity_id))
  • Join Filter: (("*SELECT* 1_1".date >= "*SELECT* 1".start_date) AND (("*SELECT* 1_1".date <= "*SELECT* 1".end_date) OR ("*SELECT* 1".end_date IS NULL)))
12. 0.023 23,983.078 ↑ 56.5 4 1

Hash Join (cost=1,687,340.36..9,293,737.89 rows=226 width=140) (actual time=12,836.322..23,983.078 rows=4 loops=1)

  • Hash Cond: (projects.account_id = accounts.id)
13. 171.459 23,982.939 ↑ 169.2 4 1

Hash Join (cost=1,687,321.69..9,293,717.42 rows=677 width=140) (actual time=12,836.188..23,982.939 rows=4 loops=1)

  • Hash Cond: (projects.id = permissions.id)
14. 193.346 23,811.432 ↓ 14.9 1,010,188 1

Append (cost=1,687,321.62..9,292,779.12 rows=67,743 width=136) (actual time=3,127.162..23,811.432 rows=1,010,188 loops=1)

15. 1,001.844 23,207.065 ↓ 5,275.7 981,282 1

Hash Join (cost=1,687,321.62..8,855,720.66 rows=186 width=108) (actual time=3,127.161..23,207.065 rows=981,282 loops=1)

  • Hash Cond: ((projects.account_id = accounts_1.id) AND ("*SELECT* 1_1".user_id = sa.user_id))
  • Join Filter: ((""*SELECT* 1_1"".date >= sa.start_date) AND (""*SELECT* 1_1"".date <= sa.end_date) AND ((((""*SELECT* 1_1"".vacation_user_id)::double precision) IS NULL) OR (((""*SELECT* 1_1"".vacation_hours)::double precision) < (COALESCE(sa.capacity, accounts_1.default_capacity))::double precision)))
  • Rows Removed by Join Filter: 272688
16. 469.091 22,201.554 ↑ 1.1 1,101,438 1

Hash Join (cost=1,687,136.92..8,813,431.19 rows=1,199,950 width=120) (actual time=3,122.995..22,201.554 rows=1,101,438 loops=1)

  • Hash Cond: ("*SELECT* 1_1".project_id = projects.id)
17. 215.468 21,730.609 ↑ 1.1 1,101,438 1

Append (cost=1,686,908.15..8,798,050.76 rows=1,199,950 width=116) (actual time=3,121.074..21,730.609 rows=1,101,438 loops=1)

18. 203.982 6,871.192 ↑ 1.2 396,845 1

Result (cost=1,686,908.15..8,590,768.79 rows=495,989 width=116) (actual time=3,121.073..6,871.192 rows=396,845 loops=1)

19. 73.198 6,667.210 ↑ 1.2 396,845 1

Append (cost=1,686,908.15..8,584,568.93 rows=495,989 width=140) (actual time=3,121.071..6,667.210 rows=396,845 loops=1)

20. 98.945 6,105.737 ↑ 1.4 338,629 1

Subquery Scan on *SELECT* 1_1 (cost=1,686,908.15..8,519,608.63 rows=457,239 width=114) (actual time=3,121.071..6,105.737 rows=338,629 loops=1)

21. 2,897.947 6,006.792 ↑ 1.4 338,629 1

Hash Right Join (cost=1,686,908.15..8,512,750.05 rows=457,239 width=134) (actual time=3,121.068..6,006.792 rows=338,629 loops=1)

  • Hash Cond: ((summary_vacations_by_dates.account_id = projects_1.account_id) AND (summary_vacations_by_dates.user_id = plan_rows.user_id))
  • Join Filter: (generate_series.generate_series = summary_vacations_by_dates.date)
  • Rows Removed by Join Filter: 14110732
22. 5.732 93.952 ↑ 17.8 32,266 1

Subquery Scan on summary_vacations_by_dates (cost=1,151,985.56..1,220,752.83 rows=575,000 width=44) (actual time=62.252..93.952 rows=32,266 loops=1)

23. 21.931 88.220 ↑ 17.8 32,266 1

GroupAggregate (cost=1,151,985.56..1,215,002.83 rows=575,000 width=52) (actual time=62.250..88.220 rows=32,266 loops=1)

  • Group Key: generate_series_1.generate_series, staff_memberships.user_id, staff_memberships.account_id
24. 18.490 66.289 ↑ 134.2 32,422 1

Sort (cost=1,151,985.56..1,162,864.01 rows=4,351,382 width=21) (actual time=62.238..66.289 rows=32,422 loops=1)

  • Sort Key: generate_series_1.generate_series, staff_memberships.user_id, staff_memberships.account_id
  • Sort Method: quicksort Memory: 2855kB
25. 11.538 47.799 ↑ 134.2 32,422 1

Hash Join (cost=138.05..493,700.50 rows=4,351,382 width=21) (actual time=2.115..47.799 rows=32,422 loops=1)

  • 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)))
  • Rows Removed by Join Filter: 1908
26. 10.170 34.223 ↑ 634.8 34,330 1

Nested Loop (cost=0.01..436,340.93 rows=21,792,000 width=17) (actual time=0.027..34.223 rows=34,330 loops=1)

27. 2.261 2.261 ↑ 1.0 21,792 1

Seq Scan on vacations (cost=0.00..500.92 rows=21,792 width=17) (actual time=0.013..2.261 rows=21,792 loops=1)

28. 21.792 21.792 ↑ 500.0 2 21,792

Function Scan on generate_series generate_series_1 (cost=0.01..10.01 rows=1,000 width=8) (actual time=0.001..0.001 rows=2 loops=21,792)

29. 1.057 2.038 ↑ 1.0 4,002 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 229kB
30. 0.981 0.981 ↑ 1.0 4,002 1

Seq Scan on staff_memberships (cost=0.00..88.02 rows=4,002 width=20) (actual time=0.007..0.981 rows=4,002 loops=1)

31. 153.489 3,014.893 ↑ 1.4 338,629 1

Hash (cost=522,705.01..522,705.01 rows=457,239 width=66) (actual time=3,014.892..3,014.893 rows=338,629 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2931kB
32. 221.659 2,861.404 ↑ 1.4 338,629 1

Hash Right Join (cost=514,123.83..522,705.01 rows=457,239 width=66) (actual time=2,584.197..2,861.404 rows=338,629 loops=1)

  • Hash Cond: ((pa.project_plan_id = project_plans.id) AND (pa.plan_row_uuid = plan_items.plan_row_uuid) AND (pa.user_id = plan_rows.user_id))
  • Join Filter: (((pa.epic_id = plan_rows.epic_id) OR (plan_rows.epic_id IS NULL)) AND ((generate_series.generate_series)::date >= pa.start_date) AND ((generate_series.generate_series)::date <= pa.end_date))
  • Rows Removed by Join Filter: 3146
33. 8.049 222.591 ↓ 8.9 44,428 1

Subquery Scan on pa (cost=8,529.07..8,653.34 rows=4,971 width=36) (actual time=165.369..222.591 rows=44,428 loops=1)

34. 80.868 214.542 ↓ 8.9 44,428 1

HashAggregate (cost=8,529.07..8,603.63 rows=4,971 width=48) (actual time=165.367..214.542 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)
35. 33.360 133.674 ↑ 1.0 44,581 1

WindowAgg (cost=6,077.00..7,080.12 rows=44,583 width=68) (actual time=93.788..133.674 rows=44,581 loops=1)

36. 44.909 100.314 ↑ 1.0 44,581 1

Sort (cost=6,077.00..6,188.46 rows=44,583 width=52) (actual time=93.775..100.314 rows=44,581 loops=1)

  • Sort Key: plan_roles.plan_row_uuid, plan_roles.start_date DESC NULLS LAST
  • Sort Method: external merge Disk: 2408kB
37. 21.374 55.405 ↑ 1.0 44,581 1

Hash Join (cost=1,631.38..2,634.26 rows=44,583 width=52) (actual time=29.046..55.405 rows=44,581 loops=1)

  • Hash Cond: (plan_roles.plan_row_uuid = plan_rows_1.uuid)
38. 5.465 5.465 ↑ 1.0 44,581 1

Seq Scan on plan_roles (cost=0.00..885.83 rows=44,583 width=24) (actual time=0.035..5.465 rows=44,581 loops=1)

39. 15.983 28.566 ↑ 1.0 48,106 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 3180kB
40. 12.583 12.583 ↑ 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.010..12.583 rows=48,106 loops=1)

41. 268.808 2,417.154 ↑ 1.4 338,629 1

Hash (cost=492,234.08..492,234.08 rows=457,239 width=70) (actual time=2,417.154..2,417.154 rows=338,629 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2569kB
42. 1,568.971 2,148.346 ↑ 1.4 338,629 1

Hash Anti Join (cost=4,168.02..492,234.08 rows=457,239 width=70) (actual time=53.211..2,148.346 rows=338,629 loops=1)

  • Hash Cond: ((projects_1.account_id = non_working_intervals_by_dates.account_id) AND (plan_rows.user_id = non_working_intervals_by_dates.user_id))
  • Join Filter: (generate_series.generate_series = non_working_intervals_by_dates.date)
  • Rows Removed by Join Filter: 11449923
43. 96.876 549.827 ↑ 1.7 346,275 1

Nested Loop (cost=1,991.21..443,836.29 rows=579,175 width=70) (actual time=23.400..549.827 rows=346,275 loops=1)

44. 13.636 98.545 ↓ 1.2 27,262 1

Hash Join (cost=1,991.21..3,663.28 rows=23,167 width=70) (actual time=23.374..98.545 rows=27,262 loops=1)

  • Hash Cond: (project_plans.project_id = projects_1.id)
45. 18.749 83.106 ↓ 1.2 27,262 1

Hash Join (cost=1,762.44..3,373.65 rows=23,167 width=66) (actual time=21.518..83.106 rows=27,262 loops=1)

  • Hash Cond: (plan_items.plan_row_uuid = plan_rows.uuid)
46. 22.972 44.751 ↓ 1.1 29,797 1

Hash Join (cost=202.03..1,744.28 rows=26,267 width=54) (actual time=1.629..44.751 rows=29,797 loops=1)

  • Hash Cond: (plan_items.project_plan_id = project_plans.id)
47. 20.185 20.185 ↓ 1.0 55,664 1

Seq Scan on plan_items (cost=0.00..1,396.10 rows=55,639 width=46) (actual time=0.010..20.185 rows=55,664 loops=1)

  • Filter: (utilization > '0'::numeric)
  • Rows Removed by Filter: 264
48. 0.485 1.594 ↑ 1.0 2,851 1

Hash (cost=166.39..166.39 rows=2,851 width=8) (actual time=1.594..1.594 rows=2,851 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 144kB
49. 1.109 1.109 ↑ 1.0 2,851 1

Seq Scan on project_plans (cost=0.00..166.39 rows=2,851 width=8) (actual time=0.006..1.109 rows=2,851 loops=1)

  • Filter: active
  • Rows Removed by Filter: 3188
50. 10.262 19.606 ↑ 1.0 42,344 1

Hash (cost=1,030.06..1,030.06 rows=42,428 width=28) (actual time=19.606..19.606 rows=42,344 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2816kB
51. 9.344 9.344 ↑ 1.0 42,344 1

Seq Scan on plan_rows (cost=0.00..1,030.06 rows=42,428 width=28) (actual time=0.010..9.344 rows=42,344 loops=1)

  • Filter: (user_id IS NOT NULL)
  • Rows Removed by Filter: 5762
52. 0.949 1.803 ↑ 1.0 5,812 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 292kB
53. 0.854 0.854 ↑ 1.0 5,812 1

Seq Scan on projects projects_1 (cost=0.00..156.12 rows=5,812 width=8) (actual time=0.009..0.854 rows=5,812 loops=1)

54. 354.406 354.406 ↑ 1.9 13 27,262

Function Scan on generate_series (cost=0.01..18.76 rows=25 width=8) (actual time=0.005..0.013 rows=13 loops=27,262)

  • Filter: (date_part('dow'::text, generate_series) = ANY ('{1,2,3,4,5}'::double precision[]))
  • Rows Removed by Filter: 5
55. 15.498 29.548 ↑ 1.0 58,975 1

Hash (cost=1,281.12..1,281.12 rows=59,712 width=12) (actual time=29.548..29.548 rows=58,975 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3047kB
56. 14.050 14.050 ↑ 1.0 59,712 1

Seq Scan on non_working_intervals_by_dates (cost=0.00..1,281.12 rows=59,712 width=12) (actual time=0.009..14.050 rows=59,712 loops=1)

57. 63.242 488.275 ↓ 1.5 58,216 1

Hash Join (cost=1,215.85..62,092.86 rows=38,750 width=114) (actual time=11.133..488.275 rows=58,216 loops=1)

  • Hash Cond: (project_plans_1.project_id = project.id)
  • Join Filter: (NOT (SubPlan 2))
  • Rows Removed by Join Filter: 770
58. 20.332 126.308 ↑ 1.3 58,986 1

Nested Loop (cost=987.08..61,446.50 rows=77,500 width=58) (actual time=7.199..126.308 rows=58,986 loops=1)

59. 2.372 42.601 ↑ 1.2 2,535 1

Hash Join (cost=987.08..2,546.49 rows=3,100 width=58) (actual time=7.173..42.601 rows=2,535 loops=1)

  • Hash Cond: (plan_items_1.project_plan_id = project_plans_1.id)
60. 17.669 37.736 ↓ 1.2 7,876 1

Hash Join (cost=785.05..2,327.21 rows=6,567 width=54) (actual time=4.618..37.736 rows=7,876 loops=1)

  • Hash Cond: (plan_items_1.plan_row_uuid = plan_rows_2.uuid)
61. 15.526 15.526 ↓ 1.0 55,664 1

Seq Scan on plan_items plan_items_1 (cost=0.00..1,396.10 rows=55,639 width=46) (actual time=0.011..15.526 rows=55,664 loops=1)

  • Filter: (utilization > '0'::numeric)
  • Rows Removed by Filter: 264
62. 1.889 4.541 ↓ 1.0 5,762 1

Hash (cost=714.07..714.07 rows=5,678 width=24) (actual time=4.541..4.541 rows=5,762 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 366kB
63. 2.369 2.652 ↓ 1.0 5,762 1

Bitmap Heap Scan on plan_rows plan_rows_2 (cost=108.29..714.07 rows=5,678 width=24) (actual time=0.337..2.652 rows=5,762 loops=1)

  • Recheck Cond: (user_id IS NULL)
  • Heap Blocks: exact=430
64. 0.283 0.283 ↓ 1.0 5,762 1

Bitmap Index Scan on index_plan_rows_on_user_id (cost=0.00..106.88 rows=5,678 width=0) (actual time=0.283..0.283 rows=5,762 loops=1)

  • Index Cond: (user_id IS NULL)
65. 0.772 2.493 ↑ 1.0 2,851 1

Hash (cost=166.39..166.39 rows=2,851 width=8) (actual time=2.493..2.493 rows=2,851 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 144kB
66. 1.721 1.721 ↑ 1.0 2,851 1

Seq Scan on project_plans project_plans_1 (cost=0.00..166.39 rows=2,851 width=8) (actual time=0.008..1.721 rows=2,851 loops=1)

  • Filter: active
  • Rows Removed by Filter: 3188
67. 63.375 63.375 ↑ 1.1 23 2,535

Function Scan on generate_series generate_series_2 (cost=0.01..18.76 rows=25 width=8) (actual time=0.009..0.025 rows=23 loops=2,535)

  • Filter: (date_part('dow'::text, generate_series) = ANY ('{1,2,3,4,5}'::double precision[]))
  • Rows Removed by Filter: 9
68. 1.774 3.795 ↑ 1.0 5,812 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 314kB
69. 2.021 2.021 ↑ 1.0 5,812 1

Seq Scan on projects project (cost=0.00..156.12 rows=5,812 width=12) (actual time=0.019..2.021 rows=5,812 loops=1)

70.          

SubPlan (for Hash Join)

71. 58.986 294.930 ↓ 0.0 0 58,986

Nested Loop (cost=0.69..16.74 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=58,986)

72. 117.972 117.972 ↑ 1.0 1 58,986

Index Scan using clients_pkey on clients clients_3 (cost=0.28..8.29 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=58,986)

  • Index Cond: (project.client_id = id)
73. 117.972 117.972 ↓ 0.0 0 58,986

Index Only Scan using non_working_intervals_by_office_id_idx on non_working_intervals_by_dates non_working_intervals_by_dates_2 (cost=0.41..8.44 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=58,986)

  • Index Cond: ((account_id = project.account_id) AND (office_id = clients_3.office_id) AND (date = generate_series_2.generate_series))
  • Heap Fetches: 770
74. 13,373.511 14,643.949 ↓ 1.0 704,593 1

Hash Right Join (cost=50,529.23..194,242.61 rows=703,961 width=116) (actual time=1,197.341..14,643.949 rows=704,593 loops=1)

  • Hash Cond: (pa_1.user_id = time_logs.user_id)
  • Join Filter: ((time_logs.date >= pa_1.start_date) AND (time_logs.date <= pa_1.end_date) AND (((pa_1.epic_id = time_logs.epic_id) AND (pa_1.project_plan_id = epics.project_plan_id)) OR ((pa_1.epic_id IS NULL) AND (pa_1.project_plan_id = active_plan.id))))
  • Rows Removed by Join Filter: 62978265
75. 10.698 283.367 ↓ 8.9 44,428 1

Subquery Scan on pa_1 (cost=8,529.07..8,653.34 rows=4,971 width=40) (actual time=206.727..283.367 rows=44,428 loops=1)

76. 111.255 272.669 ↓ 8.9 44,428 1

HashAggregate (cost=8,529.07..8,603.63 rows=4,971 width=48) (actual time=206.725..272.669 rows=44,428 loops=1)

  • Group Key: plan_rows_3.project_plan_id, plan_rows_3.epic_id, plan_rows_3.user_id, plan_roles_1.activity_id, COALESCE(plan_roles_1.start_date, '1980-01-01'::date), COALESCE(lag((plan_roles_1.start_date - 1), 1) OVER (?), '3000-01-01'::date)
77. 47.818 161.414 ↑ 1.0 44,581 1

WindowAgg (cost=6,077.00..7,080.12 rows=44,583 width=68) (actual time=104.122..161.414 rows=44,581 loops=1)

78. 51.879 113.596 ↑ 1.0 44,581 1

Sort (cost=6,077.00..6,188.46 rows=44,583 width=52) (actual time=104.108..113.596 rows=44,581 loops=1)

  • Sort Key: plan_roles_1.plan_row_uuid, plan_roles_1.start_date DESC NULLS LAST
  • Sort Method: external merge Disk: 2408kB
79. 24.361 61.717 ↑ 1.0 44,581 1

Hash Join (cost=1,631.38..2,634.26 rows=44,583 width=52) (actual time=31.159..61.717 rows=44,581 loops=1)

  • Hash Cond: (plan_roles_1.plan_row_uuid = plan_rows_3.uuid)
80. 6.644 6.644 ↑ 1.0 44,581 1

Seq Scan on plan_roles plan_roles_1 (cost=0.00..885.83 rows=44,583 width=24) (actual time=0.010..6.644 rows=44,581 loops=1)

81. 16.976 30.712 ↑ 1.0 48,106 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 3180kB
82. 13.736 13.736 ↑ 1.0 48,106 1

Seq Scan on plan_rows plan_rows_3 (cost=0.00..1,030.06 rows=48,106 width=28) (actual time=0.009..13.736 rows=48,106 loops=1)

83. 417.090 987.071 ↑ 1.0 703,961 1

Hash (cost=27,700.65..27,700.65 rows=703,961 width=40) (actual time=987.070..987.071 rows=703,961 loops=1)

  • Buckets: 65536 (originally 65536) Batches: 32 (originally 16) Memory Usage: 3585kB
84. 403.480 569.981 ↑ 1.0 703,961 1

Hash Join (cost=1,826.58..27,700.65 rows=703,961 width=40) (actual time=27.057..569.981 rows=703,961 loops=1)

  • Hash Cond: (time_logs.epic_id = epics.id)
85. 139.717 139.717 ↑ 1.0 703,961 1

Seq Scan on time_logs (cost=0.00..16,194.61 rows=703,961 width=28) (actual time=0.040..139.717 rows=703,961 loops=1)

86. 8.548 26.784 ↑ 1.0 26,435 1

Hash (cost=1,496.14..1,496.14 rows=26,435 width=16) (actual time=26.783..26.784 rows=26,435 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1424kB
87. 11.744 18.236 ↑ 1.0 26,435 1

Hash Left Join (cost=202.03..1,496.14 rows=26,435 width=16) (actual time=2.541..18.236 rows=26,435 loops=1)

  • Hash Cond: (epics.project_id = active_plan.project_id)
88. 3.994 3.994 ↑ 1.0 26,435 1

Seq Scan on epics (cost=0.00..619.35 rows=26,435 width=12) (actual time=0.007..3.994 rows=26,435 loops=1)

89. 0.761 2.498 ↑ 1.0 2,851 1

Hash (cost=166.39..166.39 rows=2,851 width=8) (actual time=2.497..2.498 rows=2,851 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 144kB
90. 1.737 1.737 ↑ 1.0 2,851 1

Seq Scan on project_plans active_plan (cost=0.00..166.39 rows=2,851 width=8) (actual time=0.009..1.737 rows=2,851 loops=1)

  • Filter: active
  • Rows Removed by Filter: 3188
91. 1.005 1.854 ↑ 1.0 5,812 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 292kB
92. 0.849 0.849 ↑ 1.0 5,812 1

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

93. 1.556 3.667 ↑ 1.0 4,221 1

Hash (cost=121.39..121.39 rows=4,221 width=49) (actual time=3.667..3.667 rows=4,221 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 429kB
94. 1.497 2.111 ↑ 1.0 4,221 1

Hash Join (cost=18.96..121.39 rows=4,221 width=49) (actual time=0.174..2.111 rows=4,221 loops=1)

  • Hash Cond: (sa.account_id = accounts_1.id)
95. 0.462 0.462 ↑ 1.0 4,221 1

Seq Scan on staff_activities_with_dates sa (cost=0.00..91.21 rows=4,221 width=40) (actual time=0.007..0.462 rows=4,221 loops=1)

96. 0.068 0.152 ↑ 1.0 354 1

Hash (cost=14.54..14.54 rows=354 width=9) (actual time=0.152..0.152 rows=354 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
97. 0.084 0.084 ↑ 1.0 354 1

Seq Scan on accounts accounts_1 (cost=0.00..14.54 rows=354 width=9) (actual time=0.003..0.084 rows=354 loops=1)

98. 15.689 411.021 ↑ 2.3 28,906 1

Subquery Scan on *SELECT* 2_1 (cost=2,320.78..436,717.88 rows=67,557 width=136) (actual time=39.470..411.021 rows=28,906 loops=1)

99. 251.198 395.332 ↑ 2.3 28,906 1

Hash Anti Join (cost=2,320.78..435,873.42 rows=67,557 width=143) (actual time=39.466..395.332 rows=28,906 loops=1)

  • Hash Cond: ((sa_1.account_id = non_working_intervals_by_dates_1.account_id) AND (sa_1.user_id = non_working_intervals_by_dates_1.user_id))
  • Join Filter: (generate_series_3.generate_series = non_working_intervals_by_dates_1.date)
  • Rows Removed by Join Filter: 1153172
100. 24.716 108.432 ↑ 2.6 29,394 1

Hash Join (cost=143.98..429,184.39 rows=77,078 width=64) (actual time=3.325..108.432 rows=29,394 loops=1)

  • Hash Cond: (vacations_1.staff_membership_id = sa_1.staff_membership_id)
  • Join Filter: ((generate_series_3.generate_series >= sa_1.start_date) AND (generate_series_3.generate_series <= sa_1.end_date))
  • Rows Removed by Join Filter: 10924
101. 11.252 80.508 ↑ 17.5 31,132 1

Nested Loop (cost=0.01..414,548.93 rows=544,800 width=44) (actual time=0.039..80.508 rows=31,132 loops=1)

102. 3.880 3.880 ↑ 1.0 21,792 1

Seq Scan on vacations vacations_1 (cost=0.00..500.92 rows=21,792 width=44) (actual time=0.015..3.880 rows=21,792 loops=1)

103. 65.376 65.376 ↑ 25.0 1 21,792

Function Scan on generate_series generate_series_3 (cost=0.01..18.76 rows=25 width=8) (actual time=0.002..0.003 rows=1 loops=21,792)

  • Filter: (date_part('dow'::text, generate_series) = ANY ('{1,2,3,4,5}'::double precision[]))
  • Rows Removed by Filter: 0
104. 1.796 3.208 ↑ 1.0 4,221 1

Hash (cost=91.21..91.21 rows=4,221 width=36) (actual time=3.207..3.208 rows=4,221 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 350kB
105. 1.412 1.412 ↑ 1.0 4,221 1

Seq Scan on staff_activities_with_dates sa_1 (cost=0.00..91.21 rows=4,221 width=36) (actual time=0.010..1.412 rows=4,221 loops=1)

106. 18.778 35.702 ↑ 1.0 58,975 1

Hash (cost=1,281.12..1,281.12 rows=59,712 width=12) (actual time=35.702..35.702 rows=58,975 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3047kB
107. 16.924 16.924 ↑ 1.0 59,712 1

Seq Scan on non_working_intervals_by_dates non_working_intervals_by_dates_1 (cost=0.00..1,281.12 rows=59,712 width=12) (actual time=0.014..16.924 rows=59,712 loops=1)

108. 0.010 0.048 ↑ 2.0 1 1

Hash (cost=0.04..0.04 rows=2 width=36) (actual time=0.048..0.048 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
109. 0.038 0.038 ↑ 2.0 1 1

CTE Scan on projects_with_permissions permissions (cost=0.00..0.04 rows=2 width=36) (actual time=0.037..0.038 rows=1 loops=1)

110. 0.003 0.116 ↑ 11.8 10 1

Hash (cost=17.20..17.20 rows=118 width=4) (actual time=0.116..0.116 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
111. 0.113 0.113 ↑ 11.8 10 1

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

  • Filter: ((suspended_at)::date >= CURRENT_DATE)
  • Rows Removed by Filter: 344
112. 131.078 551.798 ↑ 1.0 263,033 1

Hash (cost=23,435.32..23,435.32 rows=272,669 width=28) (actual time=551.797..551.798 rows=263,033 loops=1)

  • Buckets: 65536 Batches: 8 Memory Usage: 2551kB
113. 47.161 420.720 ↑ 1.0 263,033 1

Append (cost=109.73..23,435.32 rows=272,669 width=28) (actual time=3.275..420.720 rows=263,033 loops=1)

114. 0.143 24.743 ↓ 9.7 474 1

Subquery Scan on *SELECT* 1 (cost=109.73..1,692.67 rows=49 width=28) (actual time=3.274..24.743 rows=474 loops=1)

115. 0.475 24.600 ↓ 9.7 474 1

Nested Loop (cost=109.73..1,692.18 rows=49 width=612) (actual time=3.273..24.600 rows=474 loops=1)

116. 0.266 23.651 ↓ 9.7 474 1

Nested Loop (cost=109.59..1,684.02 rows=49 width=36) (actual time=3.252..23.651 rows=474 loops=1)

117. 0.080 2.215 ↓ 5.0 5 1

Nested Loop (cost=109.17..306.98 rows=1 width=24) (actual time=1.867..2.215 rows=5 loops=1)

  • Join Filter: (clients.brand_id = rate_cards.rateable_id)
  • Rows Removed by Join Filter: 570
118. 0.151 0.985 ↑ 1.0 115 1

WindowAgg (cost=108.61..111.49 rows=115 width=45) (actual time=0.831..0.985 rows=115 loops=1)

119. 0.066 0.834 ↑ 1.0 115 1

Sort (cost=108.61..108.90 rows=115 width=21) (actual time=0.820..0.834 rows=115 loops=1)

  • Sort Key: rate_cards.rateable_id, rate_cards.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 30kB
120. 0.768 0.768 ↑ 1.0 115 1

Seq Scan on rate_cards (cost=0.00..104.68 rows=115 width=21) (actual time=0.181..0.768 rows=115 loops=1)

  • Filter: ((rateable_type)::text = 'Brand'::text)
  • Rows Removed by Filter: 4739
121. 0.128 1.150 ↑ 1.0 5 115

Materialize (cost=0.56..185.73 rows=5 width=8) (actual time=0.005..0.010 rows=5 loops=115)

122. 0.008 1.022 ↑ 1.0 5 1

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

123. 0.008 0.989 ↑ 1.0 5 1

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

124. 0.941 0.941 ↑ 1.0 5 1

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

  • Filter: ((rates_type)::text = 'brand'::text)
  • Rows Removed by Filter: 5805
125. 0.040 0.040 ↑ 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.008..0.008 rows=1 loops=5)

  • Index Cond: (id = pricing_models.project_id)
126. 0.025 0.025 ↑ 1.0 1 5

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

  • Index Cond: (id = projects_2.client_id)
127. 21.170 21.170 ↓ 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=20) (actual time=1.183..4.234 rows=95 loops=5)

  • Index Cond: (rate_card_id = rate_cards.id)
128. 0.474 0.474 ↑ 1.0 1 474

Index Only Scan using brands_pkey on brands (cost=0.14..0.17 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=474)

  • Index Cond: (id = clients.brand_id)
  • Heap Fetches: 474
129. 20.992 107.787 ↓ 2.6 91,600 1

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

130. 55.639 86.795 ↓ 2.6 91,600 1

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

  • Hash Cond: (rates_1.rate_card_id = rate_cards_1.id)
131. 23.333 23.333 ↑ 1.0 174,437 1

Seq Scan on rates rates_1 (cost=0.00..3,542.37 rows=174,437 width=20) (actual time=0.014..23.333 rows=174,437 loops=1)

132. 0.223 7.823 ↑ 1.1 657 1

Hash (cost=574.00..574.00 rows=720 width=16) (actual time=7.823..7.823 rows=657 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
133. 0.250 7.600 ↑ 1.1 657 1

Hash Join (cost=378.98..574.00 rows=720 width=16) (actual time=4.930..7.600 rows=657 loops=1)

  • Hash Cond: (clients_1.office_id = offices.id)
134. 0.283 5.023 ↑ 1.0 623 1

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

  • Hash Cond: (projects_3.client_id = clients_1.id)
135. 1.333 3.543 ↑ 1.0 623 1

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

  • Hash Cond: (projects_3.id = pricing_models_1.project_id)
136. 0.900 0.900 ↑ 1.0 5,812 1

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

137. 0.173 1.310 ↑ 1.0 623 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 30kB
138. 1.137 1.137 ↑ 1.0 623 1

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

  • Filter: ((rates_type)::text = 'office'::text)
  • Rows Removed by Filter: 5187
139. 0.555 1.197 ↑ 1.0 1,849 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 89kB
140. 0.642 0.642 ↑ 1.0 1,849 1

Seq Scan on clients clients_1 (cost=0.00..40.49 rows=1,849 width=8) (actual time=0.009..0.642 rows=1,849 loops=1)

141. 0.173 2.327 ↑ 1.1 450 1

Hash (cost=158.85..158.85 rows=489 width=20) (actual time=2.327..2.327 rows=450 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
142. 0.209 2.154 ↑ 1.1 450 1

Hash Join (cost=140.44..158.85 rows=489 width=20) (actual time=1.399..2.154 rows=450 loops=1)

  • Hash Cond: (rate_cards_1.rateable_id = offices.id)
143. 0.533 1.723 ↑ 1.0 489 1

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

144. 0.317 1.190 ↑ 1.0 489 1

Sort (cost=126.52..127.74 rows=489 width=21) (actual time=1.136..1.190 rows=489 loops=1)

  • Sort Key: rate_cards_1.rateable_id, rate_cards_1.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 48kB
145. 0.873 0.873 ↑ 1.0 489 1

Seq Scan on rate_cards rate_cards_1 (cost=0.00..104.68 rows=489 width=21) (actual time=0.168..0.873 rows=489 loops=1)

  • Filter: ((rateable_type)::text = 'Office'::text)
  • Rows Removed by Filter: 4365
146. 0.130 0.222 ↑ 1.0 441 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
147. 0.092 0.092 ↑ 1.0 441 1

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

148. 22.530 124.878 ↑ 2.2 94,593 1

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

149. 61.619 102.348 ↑ 2.2 94,593 1

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

  • Hash Cond: (rates_2.rate_card_id = rate_cards_2.id)
150. 25.748 25.748 ↑ 1.0 174,437 1

Seq Scan on rates rates_2 (cost=0.00..3,542.37 rows=174,437 width=20) (actual time=0.009..25.748 rows=174,437 loops=1)

151. 1.257 14.981 ↑ 1.0 4,004 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 252kB
152. 1.627 13.724 ↑ 1.0 4,004 1

Hash Join (cost=586.95..788.31 rows=4,197 width=16) (actual time=9.044..13.724 rows=4,004 loops=1)

  • Hash Cond: (projects_4.client_id = clients_2.id)
153. 1.619 5.958 ↑ 1.0 3,620 1

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

  • Hash Cond: (pricing_models_2.project_id = projects_4.id)
154. 1.505 1.505 ↑ 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.008..1.505 rows=3,621 loops=1)

  • Filter: ((rates_type)::text = 'client'::text)
  • Rows Removed by Filter: 2189
155. 1.263 2.834 ↑ 1.0 5,812 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 292kB
156. 1.571 1.571 ↑ 1.0 5,812 1

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

157. 0.649 6.139 ↑ 1.0 1,820 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 109kB
158. 0.716 5.490 ↑ 1.0 1,820 1

Hash Join (cost=266.89..335.42 rows=1,821 width=20) (actual time=2.666..5.490 rows=1,820 loops=1)

  • Hash Cond: (rate_cards_2.rateable_id = clients_2.id)
159. 1.931 4.112 ↑ 1.0 1,821 1

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

160. 1.100 2.181 ↑ 1.0 1,821 1

Sort (cost=203.29..207.84 rows=1,821 width=21) (actual time=1.969..2.181 rows=1,821 loops=1)

  • Sort Key: rate_cards_2.rateable_id, rate_cards_2.start_date DESC NULLS LAST
  • Sort Method: quicksort Memory: 146kB
161. 1.081 1.081 ↑ 1.0 1,821 1

Seq Scan on rate_cards rate_cards_2 (cost=0.00..104.68 rows=1,821 width=21) (actual time=0.008..1.081 rows=1,821 loops=1)

  • Filter: ((rateable_type)::text = 'Client'::text)
  • Rows Removed by Filter: 3033
162. 0.361 0.662 ↑ 1.0 1,849 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 82kB
163. 0.301 0.301 ↑ 1.0 1,849 1

Seq Scan on clients clients_2 (cost=0.00..40.49 rows=1,849 width=4) (actual time=0.007..0.301 rows=1,849 loops=1)

164. 18.942 116.151 ↓ 2.4 76,366 1

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

165. 58.993 97.209 ↓ 2.4 76,366 1

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

  • Hash Cond: (rates_3.rate_card_id = rate_cards_3.id)
166. 27.088 27.088 ↑ 1.0 174,437 1

Seq Scan on rates rates_3 (cost=0.00..3,542.37 rows=174,437 width=20) (actual time=0.011..27.088 rows=174,437 loops=1)

167. 0.549 11.128 ↓ 2.4 1,591 1

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

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 91kB
168. 1.594 10.579 ↓ 2.4 1,591 1

Hash Join (cost=502.95..687.40 rows=653 width=16) (actual time=8.095..10.579 rows=1,591 loops=1)

  • Hash Cond: (projects_5.id = pricing_models_3.project_id)
169. 0.922 0.922 ↑ 1.0 5,812 1

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

170. 0.455 8.063 ↓ 2.4 1,591 1

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

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 91kB
171. 0.712 7.608 ↓ 2.4 1,591 1

Hash Join (cost=403.40..494.79 rows=653 width=16) (actual time=4.361..7.608 rows=1,591 loops=1)

  • Hash Cond: (rate_cards_3.rateable_id = pricing_models_3.id)
172. 2.326 5.158 ↑ 1.0 2,429 1

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

173. 1.602 2.832 ↑ 1.0 2,429 1

Sort (cost=241.26..247.33 rows=2,429 width=21) (actual time=2.582..2.832 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
174. 1.230 1.230 ↑ 1.0 2,429 1

Seq Scan on rate_cards rate_cards_3 (cost=0.00..104.68 rows=2,429 width=21) (actual time=0.011..1.230 rows=2,429 loops=1)

  • Filter: ((rateable_type)::text = 'PricingModel'::text)
  • Rows Removed by Filter: 2425
175. 0.422 1.738 ↑ 1.0 1,561 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 77kB
176. 1.316 1.316 ↑ 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.013..1.316 rows=1,561 loops=1)

  • Filter: ((rates_type)::text = 'custom'::text)
  • Rows Removed by Filter: 4249
Planning time : 13.315 ms
Execution time : 24,576.250 ms