explain.depesz.com

PostgreSQL's explain analyze made readable

Result: izcf : F3+RBAC

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 8,543.216 ↑ 2.4 14 1

Sort (cost=35,804.75..35,804.84 rows=33 width=36) (actual time=8,543.215..8,543.216 rows=14 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 26kB
2. 229.430 8,543.207 ↑ 2.4 14 1

HashAggregate (cost=35,803.26..35,803.92 rows=33 width=36) (actual time=8,543.201..8,543.207 rows=14 loops=1)

  • Group Key: i.bucket
3. 932.719 8,313.777 ↓ 37.5 768,428 1

Nested Loop Left Join (cost=733.86..35,393.70 rows=20,478 width=53) (actual time=1,463.066..8,313.777 rows=768,428 loops=1)

  • Join Filter: ((t0.began >= i.begin) AND (t0.began <= i.""end""))
  • Rows Removed by Join Filter: 9,989,564
4. 0.014 0.104 ↑ 2.4 14 1

Subquery Scan on i (cost=0.00..4.00 rows=33 width=20) (actual time=0.010..0.104 rows=14 loops=1)

  • Filter: (i.bucket > 0)
  • Rows Removed by Filter: 1
5. 0.071 0.090 ↑ 6.7 15 1

WindowAgg (cost=0.00..2.75 rows=100 width=20) (actual time=0.008..0.090 rows=15 loops=1)

6. 0.019 0.019 ↑ 6.7 15 1

Function Scan on unnest times (cost=0.00..1.00 rows=100 width=16) (actual time=0.005..0.019 rows=15 loops=1)

  • Filter: (t IS NOT NULL)
7. 1,271.244 7,380.954 ↓ 137.6 768,428 14

Materialize (cost=733.86..32,178.32 rows=5,585 width=57) (actual time=0.811..527.211 rows=768,428 loops=14)

8. 180.645 6,109.710 ↓ 137.6 768,428 1

Nested Loop (cost=733.86..32,150.40 rows=5,585 width=57) (actual time=11.314..6,109.710 rows=768,428 loops=1)

9. 0.000 3,431.674 ↓ 133.6 192,107 1

Nested Loop (cost=733.30..18,916.20 rows=1,438 width=24) (actual time=11.303..3,431.674 rows=192,107 loops=1)

10. 0.000 2,874.835 ↓ 133.6 192,122 1

Nested Loop (cost=732.88..18,172.32 rows=1,438 width=24) (actual time=11.295..2,874.835 rows=192,122 loops=1)

11. 43.343 2,315.513 ↓ 134.7 192,126 1

Nested Loop (cost=732.46..17,450.51 rows=1,426 width=24) (actual time=11.288..2,315.513 rows=192,126 loops=1)

12. 1,685.194 1,695.555 ↓ 134.0 192,205 1

Bitmap Heap Scan on call t0 (cost=732.03..7,451.55 rows=1,434 width=24) (actual time=11.277..1,695.555 rows=192,205 loops=1)

  • Recheck Cond: ((began >= ('{""2020-03-01 13:00:00+00"",""2020-03-08 13:00:00+00"",""2020-03-15 13:00:00+00"",""2020-03-22 13:00:00+00"",""2020-03-29 13:00:00+00"",""2020-04-05 14:00:00+00"",""2020-04-12 14:00:00+00"",""2020-04-19 14:00:00+00"",""2020-04-26 14:00:00+00"",""2020-05-03 14:00:00+00"",""2020-05-10 14:00:00+00"",""2020-05-17 14:00:00+00"",""2020-05-24 14:00:00+00"",""2020-05-31 14:00:00+00"",""2020-06-11 14:00:00+00""}'::timestamp with time zone[])[1]) AND (began < ('{""2020-03-01 13:00:00+00"",""2020-03-08 13:00:00+00"",""2020-03-15 13:00:00+00"",""2020-03-22 13:00:00+00"",""2020-03-29 13:00:00+00"",""2020-04-05 14:00:00+00"",""2020-04-12 14:00:00+00"",""2020-04-19 14:00:00+00"",""2020-04-26 14:00:00+00"",""2020-05-03 14:00:00+00"",""2020-05-10 14:00:00+00"",""2020-05-17 14:00:00+00"",""2020-05-24 14:00:00+00"",""2020-05-31 14:00:00+00"",""2020-06-11 14:00:00+00""}'::timestamp with time zone[])[15]))
  • Filter: (lisa_super_user() OR ((hashed SubPlan 1) IS TRUE))
  • Heap Blocks: exact=6,983
13. 10.361 10.361 ↓ 89.4 192,205 1

Bitmap Index Scan on call_idx_began (cost=0.00..81.93 rows=2,151 width=0) (actual time=10.361..10.361 rows=192,205 loops=1)

  • Index Cond: ((began >= ('{""2020-03-01 13:00:00+00"",""2020-03-08 13:00:00+00"",""2020-03-15 13:00:00+00"",""2020-03-22 13:00:00+00"",""2020-03-29 13:00:00+00"",""2020-04-05 14:00:00+00"",""2020-04-12 14:00:00+00"",""2020-04-19 14:00:00+00"",""2020-04-26 14:00:00+00"",""2020-05-03 14:00:00+00"",""2020-05-10 14:00:00+00"",""2020-05-17 14:00:00+00"",""2020-05-24 14:00:00+00"",""2020-05-31 14:00:00+00"",""2020-06-11 14:00:00+00""}'::timestamp with time zone[])[1]) AND (began < ('{""2020-03-01 13:00:00+00"",""2020-03-08 13:00:00+00"",""2020-03-15 13:00:00+00"",""2020-03-22 13:00:00+00"",""2020-03-29 13:00:00+00"",""2020-04-05 14:00:00+00"",""2020-04-12 14:00:00+00"",""2020-04-19 14:00:00+00"",""2020-04-26 14:00:00+00"",""2020-05-03 14:00:00+00"",""2020-05-10 14:00:00+00"",""2020-05-17 14:00:00+00"",""2020-05-24 14:00:00+00"",""2020-05-31 14:00:00+00"",""2020-06-11 14:00:00+00""}'::timestamp with time zone[])[15]))
14.          

SubPlan (for Bitmap Heap Scan)

15. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=71.08..604.41 rows=18,133 width=16) (never executed)

  • Hash Cond: (((((unnest(regexp_match(t1_1.c1, '^team_(.+)'::text))))::character varying))::text = (t0_1.access_control_name)::text)
16. 0.000 0.000 ↓ 0.0 0

Result (cost=0.01..202.01 rows=10,000 width=32) (never executed)

17. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.01..52.01 rows=10,000 width=32) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Function Scan on json_array_elements_text t1_1 (cost=0.01..1.01 rows=100 width=32) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Hash (cost=54.07..54.07 rows=1,360 width=48) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.88..54.07 rows=1,360 width=48) (never executed)

  • Hash Cond: (t2_1.ac_team_id = t0_1.id)
21. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team_membership t2_1 (cost=0.00..23.60 rows=1,360 width=32) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=48) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Seq Scan on ac_team t0_1 (cost=0.00..17.50 rows=750 width=48) (never executed)

24. 576.615 576.615 ↑ 1.0 1 192,205

Index Scan using transcript_unique_call_id on transcript t1 (cost=0.42..6.97 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=192,205)

  • Index Cond: (call_id = t0.id)
25. 576.378 576.378 ↑ 1.0 1 192,126

Index Scan using enriched_transcript_unique_transcript_id on enriched_transcript t2 (cost=0.42..0.51 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=192,126)

  • Index Cond: (transcript_id = t1.id)
26. 576.366 576.366 ↑ 1.0 1 192,122

Index Scan using scorecard_run_unique_enriched_transcript_id on scorecard_run t3 (cost=0.42..0.52 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=192,122)

  • Index Cond: (enriched_transcript_id = t2.id)
27. 2,497.391 2,497.391 ↑ 6.2 4 192,107

Index Scan using scorecard_result_idx_scorecard_run_id_parent on scorecard_result t4 (cost=0.56..8.95 rows=25 width=65) (actual time=0.009..0.013 rows=4 loops=192,107)

  • Index Cond: (scorecard_run_id = t3.id)
  • Filter: ((parent IS NULL) OR ((question)::text = 'Communication'::text) OR ((question)::text = 'Compliance'::text) OR ((question)::text = 'Conduct'::text))
  • Rows Removed by Filter: 29
Planning time : 2.223 ms
Execution time : 8,552.693 ms