explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mo5l

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 9,234.896 ↑ 2.4 14 1

Sort (cost=35,818.04..35,818.12 rows=33 width=36) (actual time=9,234.895..9,234.896 rows=14 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 26kB
2. 301.634 9,234.888 ↑ 2.4 14 1

HashAggregate (cost=35,816.55..35,817.21 rows=33 width=36) (actual time=9,234.883..9,234.888 rows=14 loops=1)

  • Group Key: i.bucket
3. 1,031.584 8,933.254 ↓ 37.5 768,428 1

Nested Loop (cost=733.86..35,406.33 rows=20,511 width=53) (actual time=12.233..8,933.254 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. 214.630 7,133.242 ↓ 137.4 768,428 1

Nested Loop (cost=733.86..32,171.71 rows=5,594 width=57) (actual time=12.212..7,133.242 rows=768,428 loops=1)

5. 66.854 4,037.007 ↓ 133.4 192,107 1

Nested Loop (cost=733.30..18,917.75 rows=1,440 width=24) (actual time=12.201..4,037.007 rows=192,107 loops=1)

6. 74.122 3,393.787 ↓ 133.4 192,122 1

Nested Loop (cost=732.88..18,172.86 rows=1,440 width=24) (actual time=12.193..3,393.787 rows=192,122 loops=1)

7. 138.103 2,743.287 ↓ 134.6 192,126 1

Nested Loop (cost=732.46..17,450.51 rows=1,427 width=24) (actual time=12.185..2,743.287 rows=192,126 loops=1)

8. 2,017.309 2,028.569 ↓ 134.0 192,205 1

Bitmap Heap Scan on call t0 (cost=732.03..7,451.55 rows=1,434 width=24) (actual time=12.173..2,028.569 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
9. 11.260 11.260 ↓ 89.4 192,205 1

Bitmap Index Scan on call_idx_began (cost=0.00..81.93 rows=2,151 width=0) (actual time=11.259..11.260 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]))
10.          

SubPlan (for Bitmap Heap Scan)

11. 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)
12. 0.000 0.000 ↓ 0.0 0

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

13. 0.000 0.000 ↓ 0.0 0

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

14. 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)

15. 0.000 0.000 ↓ 0.0 0

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

16. 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)
17. 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)

18. 0.000 0.000 ↓ 0.0 0

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

19. 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)

20. 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)
21. 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)
22. 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)
23. 2,881.605 2,881.605 ↑ 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.010..0.015 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
24. 768.410 768.428 ↑ 2.4 14 768,428

Materialize (cost=0.00..4.17 rows=33 width=20) (actual time=0.000..0.001 rows=14 loops=768,428)

25. 0.003 0.018 ↑ 2.4 14 1

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

  • Filter: (i.bucket > 0)
  • Rows Removed by Filter: 1
26. 0.009 0.015 ↑ 6.7 15 1

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

27. 0.006 0.006 ↑ 6.7 15 1

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

  • Filter: (t IS NOT NULL)
Planning time : 1.428 ms
Execution time : 9,235.079 ms