explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3IQY

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 4,896.704 ↑ 14.3 14 1

Sort (cost=4,096,123.77..4,096,124.27 rows=200 width=36) (actual time=4,896.703..4,896.704 rows=14 loops=1)

  • Sort Method: quicksort Memory: 26kB
  • Sort Key: i.bucket
2. 241.306 4,896.695 ↑ 14.3 14 1

HashAggregate (cost=4,096,112.12..4,096,116.12 rows=200 width=36) (actual time=4,896.690..4,896.695 rows=14 loops=1)

  • Group Key: i.bucket
3. 85.521 4,655.389 ↑ 1.2 768,428 1

Nested Loop Left Join (cost=2.25..4,077,614.34 rows=924,889 width=53) (actual time=0.076..4,655.389 rows=768,428 loops=1)

4. 4,569.852 4,569.852 ↓ 59.2 54,888 14

Nested Loop (cost=2.25..4,068.33 rows=927 width=57) (actual time=0.034..326.418 rows=54,888 loops=14)

5. 0.000 0.016 ↑ 71.4 14 1

Function Scan on generate_series i (cost=0.00..10.00 rows=1,000 width=4) (actual time=0.005..0.016 rows=14 loops=1)

6. 1,785.140 1,785.140 ↓ 57.4 13,722 14

Nested Loop (cost=1.69..1,881.37 rows=239 width=24) (actual time=0.023..127.510 rows=13,722 loops=14)

7. 878.542 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.90 rows=25 width=65) (actual time=0.009..0.014 rows=4 loops=192,107)

  • Rows Removed by Filter: 29
  • 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))
8. 1,234.590 1,234.590 ↓ 57.4 13,723 14

Nested Loop (cost=1.27..1,757.74 rows=239 width=24) (actual time=0.020..88.185 rows=13,723 loops=14)

9. 0.000 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)
10. 682.752 682.752 ↓ 57.9 13,723 14

Nested Loop (cost=0.85..1,637.79 rows=237 width=24) (actual time=0.016..48.768 rows=13,723 loops=14)

11. 0.000 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)
12. 0.014 0.014 ↑ 1.0 1 14

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.001 rows=1 loops=14)

13. 0.000 658.476 ↓ 57.9 13,723 14

Nested Loop (cost=0.85..1,635.40 rows=237 width=24) (actual time=0.016..47.034 rows=13,723 loops=14)

14. 576.615 576.615 ↑ 1.0 1 192,205

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

15. 97.818 97.818 ↓ 57.4 13,729 14

Index Scan using call_idx_began on call t0 (cost=0.42..83.58 rows=239 width=24) (actual time=0.010..6.987 rows=13,729 loops=14)

  • Index Cond: (call_id = t0.id)
  • 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[])[i.bucket]) 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[])[(i.bucket + 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[])[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]))
Planning time : 4.658 ms
Execution time : 4,896.799 ms