explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Yc8

Settings
# exclusive inclusive rows x rows loops node
1. 0.201 691.168 ↓ 21.8 305 1

Nested Loop Anti Join (cost=108,185.58..113,157.89 rows=14 width=8) (actual time=581.803..691.168 rows=305 loops=1)

2. 0.300 690.355 ↓ 21.9 306 1

Nested Loop Semi Join (cost=108,185.15..113,150.36 rows=14 width=12) (actual time=581.796..690.355 rows=306 loops=1)

3. 24.423 683.275 ↓ 13.0 339 1

Hash Join (cost=108,184.71..113,131.91 rows=26 width=20) (actual time=581.752..683.275 rows=339 loops=1)

  • Hash Cond: (event.case_id = c.id)
  • Join Filter: (((min(event.date)) - (min(event_1.date))) > 0)
  • Rows Removed by Join Filter: 408
4. 174.436 462.483 ↓ 1.0 211,816 1

Finalize HashAggregate (cost=61,073.97..63,156.51 rows=208,254 width=8) (actual time=385.117..462.483 rows=211,816 loops=1)

  • Group Key: event.case_id
5. 48.882 288.047 ↓ 1.2 211,816 1

Gather (cost=41,524.33..60,185.35 rows=177,724 width=8) (actual time=222.132..288.047 rows=211,816 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 68.007 239.165 ↑ 1.3 70,605 3

Partial HashAggregate (cost=40,524.33..41,412.95 rows=88,862 width=8) (actual time=213.226..239.165 rows=70,605 loops=3)

  • Group Key: event.case_id
7. 171.158 171.158 ↑ 1.3 70,605 3

Parallel Seq Scan on event (cost=0.00..40,080.02 rows=88,862 width=8) (actual time=0.045..171.158 rows=70,605 loops=3)

  • Filter: (event_type = 'summary_judgment'::text)
  • Rows Removed by Filter: 890772
8. 0.455 196.369 ↓ 1.6 1,551 1

Hash (cost=47,098.72..47,098.72 rows=962 width=12) (actual time=196.369..196.369 rows=1,551 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 83kB
9. 1.113 195.914 ↓ 1.6 1,551 1

Nested Loop (cost=41,097.81..47,098.72 rows=962 width=12) (actual time=184.284..195.914 rows=1,551 loops=1)

10. 0.447 185.495 ↓ 1.6 1,551 1

Finalize GroupAggregate (cost=41,097.38..41,210.60 rows=962 width=8) (actual time=184.232..185.495 rows=1,551 loops=1)

  • Group Key: event_1.case_id
11. 0.000 185.048 ↓ 1.9 1,551 1

Gather Merge (cost=41,097.38..41,196.97 rows=802 width=8) (actual time=184.224..185.048 rows=1,551 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 0.576 540.060 ↓ 1.3 517 3

Partial GroupAggregate (cost=40,097.36..40,104.38 rows=401 width=8) (actual time=179.740..180.020 rows=517 loops=3)

  • Group Key: event_1.case_id
13. 1.755 539.484 ↓ 1.3 517 3

Sort (cost=40,097.36..40,098.36 rows=401 width=8) (actual time=179.728..179.828 rows=517 loops=3)

  • Sort Key: event_1.case_id
  • Sort Method: quicksort Memory: 53kB
  • Worker 0: Sort Method: quicksort Memory: 48kB
  • Worker 1: Sort Method: quicksort Memory: 45kB
14. 537.729 537.729 ↓ 1.3 517 3

Parallel Seq Scan on event event_1 (cost=0.00..40,080.02 rows=401 width=8) (actual time=0.871..179.243 rows=517 loops=3)

  • Filter: (event_type = 'class_certification'::text)
  • Rows Removed by Filter: 960860
15. 9.306 9.306 ↑ 1.0 1 1,551

Index Only Scan using iplc_case_id_nos_code_idx on iplc_case c (cost=0.43..6.11 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=1,551)

  • Index Cond: (id = event_1.case_id)
  • Heap Fetches: 793
16. 6.780 6.780 ↑ 1.0 1 339

Index Only Scan using positve_case_tags_pkey on positve_case_tags pct (cost=0.43..0.70 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=339)

  • Index Cond: (case_id = c.id)
  • Filter: (tag_id = ANY ('{27,24,23,89,263,36,286,287,22,386,370,432}'::integer[]))
  • Rows Removed by Filter: 5
  • Heap Fetches: 683
17. 0.612 0.612 ↓ 0.0 0 306

Index Only Scan using positve_case_tags_pkey on positve_case_tags pct_1 (cost=0.43..0.53 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=306)

  • Index Cond: ((case_id = c.id) AND (tag_id = 359))
  • Heap Fetches: 0