explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jCGvM

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 5,195.120 ↑ 6.7 15 1

Sort (cost=455,671.26..455,671.51 rows=100 width=36) (actual time=5,195.119..5,195.120 rows=15 loops=1)

  • Sort Key: ((times.n)::integer)
  • Sort Method: quicksort Memory: 26kB
2. 257.780 5,195.110 ↑ 6.7 15 1

HashAggregate (cost=455,665.94..455,667.94 rows=100 width=36) (actual time=5,195.106..5,195.110 rows=15 loops=1)

  • Group Key: ((times.n)::integer)
3. 88.798 4,937.330 ↓ 8.3 768,429 1

Nested Loop Left Join (cost=2.25..453,807.28 rows=92,933 width=53) (actual time=0.012..4,937.330 rows=768,429 loops=1)

4. 0.074 0.097 ↑ 6.7 15 1

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

5. 0.023 0.023 ↑ 6.7 15 1

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

6. 61.800 4,848.435 ↓ 55.2 51,229 15

Nested Loop (cost=2.25..4,528.76 rows=928 width=57) (actual time=0.034..323.229 rows=51,229 loops=15)

7. 21.669 1,905.030 ↓ 53.6 12,807 15

Nested Loop (cost=1.69..2,335.28 rows=239 width=24) (actual time=0.023..127.002 rows=12,807 loops=15)

8. 24.732 1,306.995 ↓ 53.6 12,808 15

Nested Loop (cost=1.27..2,211.65 rows=239 width=24) (actual time=0.019..87.133 rows=12,808 loops=15)

9. 32.760 705.885 ↓ 54.0 12,808 15

Nested Loop (cost=0.84..2,091.68 rows=237 width=24) (actual time=0.015..47.059 rows=12,808 loops=15)

10. 96.510 96.510 ↓ 53.6 12,814 15

Index Scan using call_idx_began on call t0 (cost=0.42..539.86 rows=239 width=24) (actual time=0.009..6.434 rows=12,814 loops=15)

  • Index Cond: ((began >= (lag(times.t) OVER (?))) AND (began <= times.t) 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]))
11. 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)

  • Index Cond: (call_id = t0.id)
12. 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)
13. 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)
14. 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.93 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
Planning time : 2.197 ms
Execution time : 5,195.212 ms