explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 66cn

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 4,393.052 ↑ 1.0 1 1

Result (cost=761,740.23..761,740.24 rows=1 width=32) (actual time=4,393.052..4,393.052 rows=1 loops=1)

2.          

Initplan (for Result)

3. 12.323 4,393.049 ↑ 1.0 1 1

Aggregate (cost=761,740.21..761,740.23 rows=1 width=32) (actual time=4,393.049..4,393.049 rows=1 loops=1)

4. 65.256 4,380.726 ↓ 16.4 80,626 1

Nested Loop Left Join (cost=301,947.82..761,727.89 rows=4,928 width=0) (actual time=834.486..4,380.726 rows=80,626 loops=1)

5. 49.191 3,992.966 ↓ 16.4 80,626 1

Nested Loop (cost=301,947.26..688,678.65 rows=4,928 width=16) (actual time=834.470..3,992.966 rows=80,626 loops=1)

  • Join Filter: (t7.result < t9.risk_threshold)
  • Rows Removed by Join Filter: 369,133
6. 0.005 0.005 ↑ 1.0 1 1

Index Scan using rule_category_pkey on rule_category t9 (cost=0.15..8.17 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (id = '2dd5c3bb-527c-4c51-b623-2a2cc1d29527'::uuid)
7. 0.000 3,943.770 ↓ 30.4 449,759 1

Gather (cost=301,947.11..688,485.67 rows=14,785 width=24) (actual time=834.447..3,943.770 rows=449,759 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 93.953 4,102.166 ↓ 24.3 149,920 3 / 3

Nested Loop Left Join (cost=300,947.11..686,007.17 rows=6,160 width=24) (actual time=774.372..4,102.166 rows=149,920 loops=3)

9. 50.620 3,258.615 ↓ 24.3 149,920 3 / 3

Hash Join (cost=300,946.55..594,695.62 rows=6,160 width=24) (actual time=774.357..3,258.615 rows=149,920 loops=3)

  • Hash Cond: (t0.agent_id = t1.id)
10. 114.172 3,207.761 ↓ 24.3 149,920 3 / 3

Nested Loop (cost=300,907.09..594,639.90 rows=6,160 width=40) (actual time=774.082..3,207.761 rows=149,920 loops=3)

11. 77.694 2,643.830 ↓ 24.3 149,920 3 / 3

Nested Loop (cost=300,906.67..587,053.67 rows=6,160 width=40) (actual time=774.065..2,643.830 rows=149,920 loops=3)

12. 87.230 2,116.377 ↓ 24.3 149,920 3 / 3

Nested Loop (cost=300,906.25..579,967.31 rows=6,160 width=40) (actual time=774.054..2,116.377 rows=149,920 loops=3)

13. 96.865 1,579.388 ↓ 24.3 149,920 3 / 3

Nested Loop (cost=300,905.82..573,101.77 rows=6,160 width=40) (actual time=774.040..1,579.388 rows=149,920 loops=3)

14. 97.356 1,032.764 ↓ 24.3 149,920 3 / 3

Hash Join (cost=300,905.40..566,192.14 rows=6,160 width=40) (actual time=774.019..1,032.764 rows=149,920 loops=3)

  • Hash Cond: (t7.parent = t5.id)
15. 279.001 304.912 ↑ 1.3 149,920 3 / 3

Parallel Bitmap Heap Scan on scorecard_result t7 (cost=13,831.01..278,621.20 rows=189,164 width=24) (actual time=141.370..304.912 rows=149,920 loops=3)

  • Recheck Cond: ((question)::text = 'Compliance'::text)
  • Heap Blocks: exact=67,982
16. 25.911 25.911 ↑ 1.0 449,759 1 / 3

Bitmap Index Scan on scorecard_result_parent_question_idx (cost=0.00..13,717.51 rows=453,994 width=0) (actual time=77.733..77.733 rows=449,759 loops=1)

  • Index Cond: ((question)::text = 'Compliance'::text)
17. 129.112 630.496 ↑ 1.0 449,759 3 / 3

Hash (cost=281,207.30..281,207.30 rows=469,367 width=32) (actual time=630.496..630.496 rows=449,759 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 32,206kB
18. 416.147 501.384 ↑ 1.0 449,759 3 / 3

Bitmap Heap Scan on scorecard_result t5 (cost=15,714.15..281,207.30 rows=469,367 width=32) (actual time=155.055..501.384 rows=449,759 loops=3)

  • Recheck Cond: (parent IS NULL)
  • Heap Blocks: exact=243,080
19. 85.237 85.237 ↑ 1.0 449,854 3 / 3

Bitmap Index Scan on scorecard_result_unique_position (cost=0.00..15,596.81 rows=469,367 width=0) (actual time=85.237..85.237 rows=449,854 loops=3)

  • Index Cond: (parent IS NULL)
20. 449.759 449.759 ↑ 1.0 1 449,759 / 3

Index Scan using scorecard_run_pkey on scorecard_run t4 (cost=0.42..1.12 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=449,759)

  • Index Cond: (id = t5.scorecard_run_id)
21. 449.759 449.759 ↑ 1.0 1 449,759 / 3

Index Scan using enriched_transcript_pkey on enriched_transcript t3 (cost=0.42..1.11 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=449,759)

  • Index Cond: (id = t4.enriched_transcript_id)
22. 449.759 449.759 ↑ 1.0 1 449,759 / 3

Index Scan using transcript_pkey on transcript t2 (cost=0.42..1.15 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=449,759)

  • Index Cond: (id = t3.transcript_id)
23. 449.759 449.759 ↑ 1.0 1 449,759 / 3

Index Scan using call_pkey on call t0 (cost=0.42..1.23 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=449,759)

  • Index Cond: (id = t2.call_id)
  • Filter: ((agent_id IS NOT NULL) AND (began < '2020-07-02 14:00:00+00'::timestamp with time zone) AND (began >= '2019-07-01 14:00:00+00'::timestamp with time zone))
24. 0.122 0.234 ↓ 1.0 787 3 / 3

Hash (cost=29.76..29.76 rows=776 width=16) (actual time=0.233..0.234 rows=787 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 45kB
25. 0.112 0.112 ↓ 1.0 787 3 / 3

Seq Scan on agent t1 (cost=0.00..29.76 rows=776 width=16) (actual time=0.009..0.112 rows=787 loops=3)

26. 749.598 749.598 ↑ 1.0 1 449,759 / 3

Index Scan using scorecard_result_unique_position on scorecard_result t6 (cost=0.56..14.81 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=449,759)

  • Index Cond: (parent = t5.id)
  • Filter: ((question)::text = 'Communication'::text)
  • Rows Removed by Filter: 2
27. 322.504 322.504 ↑ 1.0 1 80,626

Index Scan using scorecard_result_unique_position on scorecard_result t8 (cost=0.56..14.81 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=80,626)

  • Index Cond: (parent = t5.id)
  • Filter: ((question)::text = 'Conduct'::text)
  • Rows Removed by Filter: 2
Planning time : 2.050 ms
Execution time : 4,398.388 ms