explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xs7d : F3 NoMat

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 6,997.749 ↑ 2.4 14 1

Sort (cost=138,107.08..138,107.16 rows=33 width=36) (actual time=6,997.748..6,997.749 rows=14 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 26kB
2. 271.568 6,997.741 ↑ 2.4 14 1

HashAggregate (cost=138,105.59..138,106.25 rows=33 width=36) (actual time=6,997.735..6,997.741 rows=14 loops=1)

  • Group Key: i.bucket
3. 90.728 6,726.173 ↓ 37.5 768,428 1

Nested Loop Left Join (cost=651.99..137,696.03 rows=20,478 width=53) (actual time=0.164..6,726.173 rows=768,428 loops=1)

4. 0.012 0.089 ↑ 2.4 14 1

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

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

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

6. 0.020 0.020 ↑ 6.7 15 1

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

  • Filter: (t IS NOT NULL)
7. 200.536 6,635.356 ↓ 89.0 54,888 14

Nested Loop (cost=651.99..4,166.32 rows=617 width=57) (actual time=0.048..473.954 rows=54,888 loops=14)

8. 16.702 3,745.322 ↓ 86.3 13,722 14

Nested Loop (cost=651.43..2,703.01 rows=159 width=24) (actual time=0.039..267.523 rows=13,722 loops=14)

9. 22.304 3,152.254 ↓ 86.3 13,723 14

Nested Loop (cost=651.01..2,620.76 rows=159 width=24) (actual time=0.035..225.161 rows=13,723 loops=14)

10. 77.913 2,553.572 ↓ 86.9 13,723 14

Nested Loop (cost=650.59..2,540.78 rows=158 width=24) (actual time=0.031..182.398 rows=13,723 loops=14)

11. 1,899.044 1,899.044 ↓ 86.3 13,729 14

Index Scan using call_idx_began on call t0 (cost=650.16..1,432.11 rows=159 width=24) (actual time=0.025..135.646 rows=13,729 loops=14)

  • Index Cond: ((began >= i.begin) AND (began <= i.""end"") 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[])[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))
12.          

SubPlan (for Index Scan)

13. 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)
14. 0.000 0.000 ↓ 0.0 0

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

15. 0.000 0.000 ↓ 0.0 0

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

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

17. 0.000 0.000 ↓ 0.0 0

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

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

20. 0.000 0.000 ↓ 0.0 0

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

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

22. 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)
23. 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)
24. 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)
25. 2,689.498 2,689.498 ↑ 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.014 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.381 ms
Execution time : 6,997.936 ms