explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A1Gg : NoFunc

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 6,709.966 ↑ 1.2 27 1

Sort (cost=950,638.44..950,638.53 rows=33 width=36) (actual time=6,709.963..6,709.966 rows=27 loops=1)

  • Sort Key: i.bucket
  • Sort Method: quicksort Memory: 27kB
2. 564.884 6,709.948 ↑ 1.2 27 1

HashAggregate (cost=950,636.95..950,637.61 rows=33 width=36) (actual time=6,709.936..6,709.948 rows=27 loops=1)

  • Group Key: i.bucket
3. 888.913 6,145.064 ↑ 3.5 1,602,596 1

Hash Join (cost=217,720.98..836,911.69 rows=5,686,263 width=53) (actual time=846.849..6,145.064 rows=1,602,596 loops=1)

  • Hash Cond: (t1.call_id = t0.id)
4. 527.191 4,936.968 ↓ 1.1 1,747,656 1

Hash Join (cost=51,739.08..554,218.97 rows=1,658,604 width=65) (actual time=523.138..4,936.968 rows=1,747,656 loops=1)

  • Hash Cond: (t2.transcript_id = t1.id)
5. 518.040 4,246.669 ↓ 1.1 1,747,656 1

Hash Join (cost=30,878.79..529,004.80 rows=1,658,604 width=65) (actual time=358.243..4,246.669 rows=1,747,656 loops=1)

  • Hash Cond: (t3.enriched_transcript_id = t2.id)
6. 562.501 3,555.280 ↓ 1.1 1,747,656 1

Hash Join (cost=16,078.12..509,850.24 rows=1,658,604 width=65) (actual time=183.044..3,555.280 rows=1,747,656 loops=1)

  • Hash Cond: (t4.scorecard_run_id = t3.id)
7. 2,811.611 2,811.611 ↓ 1.1 1,747,656 1

Seq Scan on scorecard_result t4 (cost=0.00..489,418.24 rows=1,658,604 width=65) (actual time=0.009..2,811.611 rows=1,747,656 loops=1)

  • Filter: ((parent IS NULL) OR ((question)::text = 'Communication'::text) OR ((question)::text = 'Compliance'::text) OR ((question)::text = 'Conduct'::text))
  • Rows Removed by Filter: 12,127,649
8. 116.310 181.168 ↓ 1.0 436,914 1

Hash (cost=10,616.94..10,616.94 rows=436,894 width=32) (actual time=181.168..181.168 rows=436,914 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,404kB
9. 64.858 64.858 ↓ 1.0 436,914 1

Seq Scan on scorecard_run t3 (cost=0.00..10,616.94 rows=436,894 width=32) (actual time=0.007..64.858 rows=436,914 loops=1)

10. 110.029 173.349 ↓ 1.0 436,932 1

Hash (cost=9,339.19..9,339.19 rows=436,919 width=32) (actual time=173.349..173.349 rows=436,932 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,405kB
11. 63.320 63.320 ↓ 1.0 436,932 1

Seq Scan on enriched_transcript t2 (cost=0.00..9,339.19 rows=436,919 width=32) (actual time=0.008..63.320 rows=436,932 loops=1)

12. 101.261 163.108 ↓ 1.0 436,940 1

Hash (cost=15,471.24..15,471.24 rows=431,124 width=32) (actual time=163.108..163.108 rows=436,940 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 31,405kB
13. 61.847 61.847 ↓ 1.0 436,940 1

Seq Scan on transcript t1 (cost=0.00..15,471.24 rows=431,124 width=32) (actual time=0.007..61.847 rows=436,940 loops=1)

14. 92.878 319.183 ↑ 3.7 401,567 1

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

  • Buckets: 1,048,576 Batches: 2 Memory Usage: 18,411kB
15. 44.880 226.305 ↑ 3.7 401,567 1

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

16. 0.027 0.210 ↓ 1.4 45 1

Subquery Scan on i (cost=0.00..4.00 rows=33 width=20) (actual time=0.033..0.210 rows=45 loops=1)

  • Filter: (i.bucket > 0)
  • Rows Removed by Filter: 1
17. 0.125 0.183 ↑ 2.2 46 1

WindowAgg (cost=0.00..2.75 rows=100 width=20) (actual time=0.030..0.183 rows=46 loops=1)

18. 0.058 0.058 ↑ 2.2 46 1

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

  • Filter: (t IS NOT NULL)
19. 181.215 181.215 ↑ 5.0 8,924 45

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

  • 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.148 ms
Execution time : 6,710.498 ms