explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yOQX

Settings
# exclusive inclusive rows x rows loops node
1. 0.068 5,030.516 ↑ 1.2 27 1

Finalize GroupAggregate (cost=673,775.84..673,777.49 rows=33 width=36) (actual time=5,030.454..5,030.516 rows=27 loops=1)

  • Group Key: i.bucket
2. 0.000 5,030.448 ↓ 1.2 81 1

Sort (cost=673,775.84..673,776.01 rows=66 width=132) (actual time=5,030.440..5,030.448 rows=81 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 46kB
3. 60.578 5,031.646 ↓ 1.2 81 1

Gather (cost=673,766.92..673,773.85 rows=66 width=132) (actual time=5,026.547..5,031.646 rows=81 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 392.462 4,971.068 ↑ 1.2 27 3 / 3

Partial HashAggregate (cost=672,766.92..672,767.25 rows=33 width=132) (actual time=4,971.052..4,971.068 rows=27 loops=3)

  • Group Key: i.bucket
5. 610.457 4,578.606 ↑ 4.4 534,199 3 / 3

Hash Join (cost=217,791.22..625,303.26 rows=2,373,183 width=53) (actual time=1,358.505..4,578.606 rows=534,199 loops=3)

  • Hash Cond: (t1.call_id = t0.id)
6. 326.605 3,496.640 ↑ 1.2 583,317 3 / 3

Hash Join (cost=51,809.32..405,609.49 rows=692,225 width=65) (actual time=881.522..3,496.640 rows=583,317 loops=3)

  • Hash Cond: (t2.transcript_id = t1.id)
7. 300.321 2,866.035 ↑ 1.2 583,317 3 / 3

Hash Join (cost=30,917.25..382,900.31 rows=692,225 width=65) (actual time=575.551..2,866.035 rows=583,317 loops=3)

  • Hash Cond: (t3.enriched_transcript_id = t2.id)
8. 308.580 2,271.212 ↑ 1.2 583,317 3 / 3

Hash Join (cost=16,098.72..366,264.66 rows=692,225 width=65) (actual time=279.491..2,271.212 rows=583,317 loops=3)

  • Hash Cond: (t4.scorecard_run_id = t3.id)
9. 1,685.161 1,685.161 ↑ 1.2 583,317 3 / 3

Parallel Seq Scan on scorecard_result t4 (cost=0.00..348,348.83 rows=692,225 width=65) (actual time=0.016..1,685.161 rows=583,317 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,049,706
10. 176.193 277.471 ↓ 1.0 437,488 3 / 3

Hash (cost=10,630.54..10,630.54 rows=437,454 width=32) (actual time=277.471..277.471 rows=437,488 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,439kB
11. 101.278 101.278 ↓ 1.0 437,488 3 / 3

Seq Scan on scorecard_run t3 (cost=0.00..10,630.54 rows=437,454 width=32) (actual time=0.017..101.278 rows=437,488 loops=3)

12. 184.731 294.502 ↓ 1.0 437,505 3 / 3

Hash (cost=9,350.46..9,350.46 rows=437,446 width=32) (actual time=294.502..294.502 rows=437,505 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,441kB
13. 109.771 109.771 ↓ 1.0 437,505 3 / 3

Seq Scan on enriched_transcript t2 (cost=0.00..9,350.46 rows=437,446 width=32) (actual time=0.016..109.771 rows=437,505 loops=3)

14. 180.870 304.000 ↓ 1.0 437,511 3 / 3

Hash (cost=15,494.81..15,494.81 rows=431,781 width=32) (actual time=303.999..304.000 rows=437,511 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,441kB
15. 123.130 123.130 ↓ 1.0 437,511 3 / 3

Seq Scan on transcript t1 (cost=0.00..15,494.81 rows=431,781 width=32) (actual time=0.011..123.130 rows=437,511 loops=3)

16. 152.228 471.509 ↑ 3.7 401,567 3 / 3

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

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

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

18. 0.025 0.205 ↓ 1.4 45 3 / 3

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

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

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

20. 0.058 0.058 ↑ 2.2 46 3 / 3

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

  • Filter: (t IS NOT NULL)
21. 235.755 235.755 ↑ 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.007..5.239 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.866 ms
Execution time : 5,032.439 ms