explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IQbpH : F2

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 4,963.972 ↑ 14.3 14 1

Sort (cost=215,124.72..215,125.22 rows=200 width=36) (actual time=4,963.972..4,963.972 rows=14 loops=1)

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

HashAggregate (cost=215,113.08..215,117.08 rows=200 width=36) (actual time=4,963.957..4,963.962 rows=14 loops=1)

  • Group Key: i.bucket
3. 1,207.269 4,757.435 ↑ 1.2 768,428 1

Nested Loop Left Join (cost=1,084.30..196,526.42 rows=929,333 width=53) (actual time=622.752..4,757.435 rows=768,428 loops=1)

  • Join Filter: ((t0.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 (t0.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)]))
  • Rows Removed by Join Filter: 9,989,564
4. 0.018 0.018 ↑ 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.018 rows=14 loops=1)

5. 1,143.479 3,550.148 ↓ 91.9 768,428 14

Materialize (cost=1,084.30..29,257.33 rows=8,364 width=57) (actual time=1.011..253.582 rows=768,428 loops=14)

6. 7.150 2,406.669 ↓ 91.9 768,428 1

Gather (cost=1,084.30..29,215.51 rows=8,364 width=57) (actual time=14.120..2,406.669 rows=768,428 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
7. 76.395 2,399.519 ↓ 78.1 384,214 2 / 2

Nested Loop (cost=84.30..27,379.11 rows=4,920 width=57) (actual time=11.522..2,399.519 rows=384,214 loops=2)

8. 25.711 978.375 ↓ 75.8 96,054 2 / 2

Nested Loop (cost=83.74..15,750.90 rows=1,267 width=24) (actual time=11.503..978.375 rows=96,054 loops=2)

9. 24.856 664.481 ↓ 75.8 96,061 2 / 2

Nested Loop (cost=83.32..15,095.49 rows=1,267 width=24) (actual time=11.486..664.481 rows=96,061 loops=2)

10. 31.640 351.436 ↓ 76.4 96,063 2 / 2

Nested Loop (cost=82.89..14,459.22 rows=1,257 width=24) (actual time=11.473..351.436 rows=96,063 loops=2)

11. 25.181 31.488 ↓ 76.0 96,102 2 / 2

Parallel Bitmap Heap Scan on call t0 (cost=82.47..6,245.58 rows=1,265 width=24) (actual time=11.459..31.488 rows=96,102 loops=2)

  • 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]))
  • Heap Blocks: exact=3,246
12. 6.307 6.307 ↓ 89.4 192,205 1 / 2

Bitmap Index Scan on call_idx_began (cost=0.00..81.93 rows=2,151 width=0) (actual time=12.614..12.614 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]))
13. 288.308 288.308 ↑ 1.0 1 192,205 / 2

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)
14. 288.189 288.189 ↑ 1.0 1 192,126 / 2

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)
15. 288.183 288.183 ↑ 1.0 1 192,122 / 2

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)
16. 1,344.749 1,344.749 ↑ 6.2 4 192,107 / 2

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.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.090 ms
Execution time : 4,972.042 ms