explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5rlH

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 8,666.724 ↑ 14.3 14 1

Sort (cost=221,155.24..221,155.74 rows=200 width=36) (actual time=8,666.723..8,666.724 rows=14 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 26kB
2. 337.689 8,666.712 ↑ 14.3 14 1

HashAggregate (cost=221,143.60..221,147.60 rows=200 width=36) (actual time=8,666.707..8,666.712 rows=14 loops=1)

  • Group Key: i.bucket
3. 1,917.031 8,329.023 ↑ 1.3 768,428 1

Nested Loop Left Join (cost=1,084.30..201,885.82 rows=962,889 width=53) (actual time=1,447.252..8,329.023 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.020 0.020 ↑ 71.4 14 1

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

5. 1,760.542 6,411.972 ↓ 88.7 768,428 14

Materialize (cost=1,084.30..28,577.48 rows=8,666 width=57) (actual time=2.341..457.998 rows=768,428 loops=14)

6. 14.624 4,651.430 ↓ 88.7 768,428 1

Gather (cost=1,084.30..28,534.15 rows=8,666 width=57) (actual time=32.731..4,651.430 rows=768,428 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
7. 100.455 4,636.806 ↓ 75.4 384,214 2 / 2

Nested Loop (cost=84.30..26,667.55 rows=5,098 width=57) (actual time=22.995..4,636.806 rows=384,214 loops=2)

8. 105.899 1,846.853 ↓ 75.1 96,054 2 / 2

Nested Loop (cost=83.74..15,801.52 rows=1,279 width=24) (actual time=22.972..1,846.853 rows=96,054 loops=2)

9. 98.239 1,260.649 ↓ 75.1 96,061 2 / 2

Nested Loop (cost=83.32..15,140.03 rows=1,279 width=24) (actual time=22.961..1,260.649 rows=96,061 loops=2)

10. 70.315 682.095 ↓ 75.9 96,063 2 / 2

Nested Loop (cost=82.89..14,499.52 rows=1,265 width=24) (actual time=22.948..682.095 rows=96,063 loops=2)

11. 75.095 131.267 ↓ 76.0 96,102 2 / 2

Nested Loop (cost=82.47..6,283.53 rows=1,265 width=24) (actual time=22.933..131.267 rows=96,102 loops=2)

12. 42.800 56.172 ↓ 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=22.931..56.172 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,293
13. 13.372 13.372 ↓ 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=26.744..26.744 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]))
14. 0.000 0.000 ↑ 1.0 1 192,205 / 2

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=192,205)

15. 480.512 480.512 ↑ 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.005..0.005 rows=1 loops=192,205)

  • Index Cond: (call_id = t0.id)
16. 480.315 480.315 ↑ 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.005..0.005 rows=1 loops=192,126)

  • Index Cond: (transcript_id = t1.id)
17. 480.305 480.305 ↑ 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.005..0.005 rows=1 loops=192,122)

  • Index Cond: (enriched_transcript_id = t2.id)
18. 2,689.498 2,689.498 ↑ 6.5 4 192,107 / 2

Index Scan using scorecard_result_idx_scorecard_run_id_parent on scorecard_result t4 (cost=0.56..8.24 rows=26 width=65) (actual time=0.018..0.028 rows=4 loops=192,107)

  • Index Cond: (scorecard_run_id = t3.id)
  • Filter: ((parent IS NULL) OR ((question)::text = ANY ('{Communication,Compliance,Conduct}'::text[])))
  • Rows Removed by Filter: 29
Planning time : 11.308 ms
Execution time : 8,674.034 ms