explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RoDk

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 4,670.398 ↑ 6.7 15 1

Sort (cost=455,666.36..455,666.61 rows=100 width=36) (actual time=4,670.398..4,670.398 rows=15 loops=1)

  • Sort Key: ((times.n)::integer)
  • Sort Method: quicksort Memory: 26kB
2. 231.085 4,670.388 ↑ 6.7 15 1

HashAggregate (cost=455,661.03..455,663.03 rows=100 width=36) (actual time=4,670.382..4,670.388 rows=15 loops=1)

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

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

4. 0.069 0.091 ↑ 6.7 15 1

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

5. 0.022 0.022 ↑ 6.7 15 1

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

6. 142.009 4,356.270 ↓ 55.2 51,229 15

Nested Loop (cost=2.25..4,528.71 rows=928 width=57) (actual time=0.030..290.418 rows=51,229 loops=15)

7. 158.096 1,716.870 ↓ 53.6 12,807 15

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

8. 155.478 1,174.530 ↓ 53.6 12,808 15

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

9. 164.125 634.800 ↓ 54.0 12,808 15

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

10. 86.265 86.265 ↓ 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.008..5.751 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. 384.410 384.410 ↑ 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.002..0.002 rows=1 loops=192,205)

  • Index Cond: (call_id = t0.id)
12. 384.252 384.252 ↑ 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.002..0.002 rows=1 loops=192,126)

  • Index Cond: (transcript_id = t1.id)
13. 384.244 384.244 ↑ 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.002..0.002 rows=1 loops=192,122)

  • Index Cond: (enriched_transcript_id = t2.id)
14. 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.93 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.117 ms
Execution time : 4,670.489 ms