explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oWLj

Settings
# exclusive inclusive rows x rows loops node
1. 0.075 4,263.494 ↑ 1.2 27 1

Finalize GroupAggregate (cost=673,445.51..673,447.16 rows=33 width=36) (actual time=4,263.421..4,263.494 rows=27 loops=1)

  • Group Key: i.bucket
2. 0.000 4,263.419 ↓ 1.2 81 1

Sort (cost=673,445.51..673,445.68 rows=66 width=132) (actual time=4,263.410..4,263.419 rows=81 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 46kB
3. 57.558 4,264.448 ↓ 1.2 81 1

Gather (cost=673,436.59..673,443.52 rows=66 width=132) (actual time=4,221.690..4,264.448 rows=81 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 288.243 4,206.890 ↑ 1.2 27 3 / 3

Partial HashAggregate (cost=672,436.59..672,436.92 rows=33 width=132) (actual time=4,206.877..4,206.890 rows=27 loops=3)

  • Group Key: i.bucket
5. 501.489 3,918.647 ↑ 4.4 534,199 3 / 3

Hash Join (cost=217,765.23..625,006.33 rows=2,371,513 width=53) (actual time=1,164.677..3,918.647 rows=534,199 loops=3)

  • Hash Cond: (t1.call_id = t0.id)
6. 270.133 2,939.148 ↑ 1.2 582,992 3 / 3

Hash Join (cost=51,783.34..405,334.29 rows=691,738 width=65) (actual time=681.289..2,939.148 rows=582,992 loops=3)

  • Hash Cond: (t2.transcript_id = t1.id)
7. 286.490 2,449.315 ↑ 1.2 582,992 3 / 3

Hash Join (cost=30,900.61..382,635.72 rows=691,738 width=65) (actual time=459.869..2,449.315 rows=582,992 loops=3)

  • Hash Cond: (t3.enriched_transcript_id = t2.id)
8. 297.038 1,931.278 ↑ 1.2 582,992 3 / 3

Hash Join (cost=16,090.99..366,010.27 rows=691,738 width=65) (actual time=226.350..1,931.278 rows=582,992 loops=3)

  • Hash Cond: (t4.scorecard_run_id = t3.id)
9. 1,410.518 1,410.518 ↑ 1.2 582,992 3 / 3

Parallel Seq Scan on scorecard_result t4 (cost=0.00..348,103.44 rows=691,738 width=65) (actual time=0.009..1,410.518 rows=582,992 loops=3)

  • Filter: ((parent IS NULL) OR ((question)::text = 'Communication'::text) OR ((question)::text = 'Compliance'::text) OR ((question)::text = 'Conduct'::text))
  • Rows Removed by Filter: 4,046,656
10. 140.968 223.722 ↑ 1.0 437,244 3 / 3

Hash (cost=10,625.44..10,625.44 rows=437,244 width=32) (actual time=223.722..223.722 rows=437,244 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,424kB
11. 82.754 82.754 ↑ 1.0 437,244 3 / 3

Seq Scan on scorecard_run t3 (cost=0.00..10,625.44 rows=437,244 width=32) (actual time=0.020..82.754 rows=437,244 loops=3)

12. 151.258 231.547 ↓ 1.0 437,261 3 / 3

Hash (cost=9,344.83..9,344.83 rows=437,183 width=32) (actual time=231.547..231.547 rows=437,261 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,425kB
13. 80.289 80.289 ↓ 1.0 437,261 3 / 3

Seq Scan on enriched_transcript t2 (cost=0.00..9,344.83 rows=437,183 width=32) (actual time=0.019..80.289 rows=437,261 loops=3)

14. 135.398 219.700 ↓ 1.0 437,267 3 / 3

Hash (cost=15,487.88..15,487.88 rows=431,588 width=32) (actual time=219.699..219.700 rows=437,267 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,426kB
15. 84.302 84.302 ↓ 1.0 437,267 3 / 3

Seq Scan on transcript t1 (cost=0.00..15,487.88 rows=431,588 width=32) (actual time=0.012..84.302 rows=437,267 loops=3)

16. 162.687 478.010 ↑ 3.7 401,567 3 / 3

Hash (cost=138,897.91..138,897.91 rows=1,475,199 width=20) (actual time=478.010..478.010 rows=401,567 loops=3)

  • Buckets: 1,048,576 Batches: 2 Memory Usage: 18,411kB
17. 73.092 315.323 ↑ 3.7 401,567 3 / 3

Nested Loop (cost=0.42..138,897.91 rows=1,475,199 width=20) (actual time=0.106..315.323 rows=401,567 loops=3)

18. 0.027 0.221 ↓ 1.4 45 3 / 3

Subquery Scan on i (cost=0.00..4.00 rows=33 width=20) (actual time=0.032..0.221 rows=45 loops=3)

  • Filter: (i.bucket > 0)
  • Rows Removed by Filter: 1
19. 0.133 0.194 ↑ 2.2 46 3 / 3

WindowAgg (cost=0.00..2.75 rows=100 width=20) (actual time=0.029..0.194 rows=46 loops=3)

20. 0.061 0.061 ↑ 2.2 46 3 / 3

Function Scan on unnest times (cost=0.00..1.00 rows=100 width=16) (actual time=0.020..0.061 rows=46 loops=3)

  • Filter: (t IS NOT NULL)
21. 242.010 242.010 ↑ 5.0 8,924 135 / 3

Index Scan using call_idx_began on call t0 (cost=0.42..3,761.88 rows=44,703 width=24) (actual time=0.009..5.378 rows=8,924 loops=135)

  • Index Cond: ((began >= i.begin) AND (began <= i.""end"") AND (began >= '2019-07-31 14:00:00+00'::timestamp with time zone) AND (began <= '2020-06-11 14:00:00+00'::timestamp with time zone))
Planning time : 1.566 ms
Execution time : 4,265.191 ms