explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PS2U

Settings
# exclusive inclusive rows x rows loops node
1. 43.387 1,019.220 ↑ 1.0 449,275 1

Append (cost=13,471.22..76,238.29 rows=470,230 width=26) (actual time=145.824..1,019.220 rows=449,275 loops=1)

2. 86.607 547.268 ↓ 1.5 342,397 1

Hash Left Join (cost=13,471.22..26,920.76 rows=235,115 width=26) (actual time=145.824..547.268 rows=342,397 loops=1)

  • Hash Cond: ((segmented_list_items.list_item_id = event_ps.list_item_id) AND (event_parts.event_id = event_ps.event_id))
3. 208.632 423.837 ↓ 1.5 342,397 1

Hash Left Join (cost=8,787.74..21,002.92 rows=235,115 width=27) (actual time=108.976..423.837 rows=342,397 loops=1)

  • Hash Cond: ((segmented_list_items.list_item_id = ps.list_item_id) AND (event_parts.event_id = ps.event_id) AND (event_parts.id = ps.event_part_id))
4. 72.978 135.192 ↓ 1.5 342,397 1

Hash Right Join (cost=1,503.02..8,403.67 rows=235,115 width=18) (actual time=28.544..135.192 rows=342,397 loops=1)

  • Hash Cond: (segmented_list_items.segmented_list_id = segmented_lists.id)
5. 33.693 33.693 ↑ 1.0 205,953 1

Seq Scan on segmented_list_items (cost=0.00..3,777.00 rows=206,000 width=16) (actual time=0.013..33.693 rows=205,953 loops=1)

6. 1.697 28.521 ↑ 1.0 7,371 1

Hash (cost=1,410.66..1,410.66 rows=7,389 width=18) (actual time=28.521..28.521 rows=7,371 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 450kB
7. 1.979 26.824 ↑ 1.0 7,371 1

Hash Left Join (cost=915.48..1,410.66 rows=7,389 width=18) (actual time=15.365..26.824 rows=7,371 loops=1)

  • Hash Cond: (event_parts.people_segmented_list_id = segmented_lists.id)
8. 1.709 18.845 ↑ 1.0 7,371 1

Hash Left Join (cost=540.81..1,016.59 rows=7,389 width=18) (actual time=9.309..18.845 rows=7,371 loops=1)

  • Hash Cond: (event_parts.event_id = event_settings.event_id)
9. 2.614 14.516 ↑ 1.0 7,371 1

Hash Right Join (cost=425.25..881.58 rows=7,389 width=17) (actual time=6.673..14.516 rows=7,371 loops=1)

  • Hash Cond: (event_part_settings.event_part_id = event_parts.id)
10. 5.281 5.281 ↓ 1.0 7,295 1

Seq Scan on event_part_settings (cost=0.00..437.19 rows=7,289 width=5) (actual time=0.010..5.281 rows=7,295 loops=1)

  • Filter: ((list_kind)::text = 'people'::text)
  • Rows Removed by Filter: 7,293
11. 1.360 6.621 ↑ 1.0 7,371 1

Hash (cost=332.89..332.89 rows=7,389 width=16) (actual time=6.621..6.621 rows=7,371 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 400kB
12. 5.261 5.261 ↑ 1.0 7,371 1

Seq Scan on event_parts (cost=0.00..332.89 rows=7,389 width=16) (actual time=0.009..5.261 rows=7,371 loops=1)

13. 0.451 2.620 ↓ 1.0 1,855 1

Hash (cost=92.66..92.66 rows=1,832 width=5) (actual time=2.620..2.620 rows=1,855 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 89kB
14. 2.169 2.169 ↓ 1.0 1,855 1

Seq Scan on event_settings (cost=0.00..92.66 rows=1,832 width=5) (actual time=0.007..2.169 rows=1,855 loops=1)

  • Filter: ((list_kind)::text = 'people'::text)
  • Rows Removed by Filter: 1,672
15. 1.308 6.000 ↓ 1.0 6,492 1

Hash (cost=293.74..293.74 rows=6,474 width=8) (actual time=6.000..6.000 rows=6,492 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 318kB
16. 4.692 4.692 ↓ 1.0 6,492 1

Seq Scan on segmented_lists (cost=0.00..293.74 rows=6,474 width=8) (actual time=0.185..4.692 rows=6,492 loops=1)

17. 28.787 80.013 ↑ 1.3 93,627 1

Hash (cost=4,468.35..4,468.35 rows=120,535 width=21) (actual time=80.013..80.013 rows=93,627 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 2,627kB
18. 51.226 51.226 ↑ 1.0 120,535 1

Seq Scan on participant_statuses ps (cost=0.00..4,468.35 rows=120,535 width=21) (actual time=1.051..51.226 rows=120,535 loops=1)

19. 6.762 36.824 ↓ 1.0 26,908 1

Hash (cost=4,285.60..4,285.60 rows=26,526 width=9) (actual time=36.824..36.824 rows=26,908 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,413kB
20. 30.062 30.062 ↓ 1.0 26,908 1

Index Scan using index_participant_statuses_on_event_part_id on participant_statuses event_ps (cost=0.42..4,285.60 rows=26,526 width=9) (actual time=0.882..30.062 rows=26,908 loops=1)

  • Index Cond: (event_part_id IS NULL)
21. 42.902 428.565 ↑ 2.2 106,878 1

Unique (cost=40,500.72..42,264.08 rows=235,115 width=26) (actual time=338.145..428.565 rows=106,878 loops=1)

22. 184.079 385.663 ↓ 1.5 342,454 1

Sort (cost=40,500.72..41,088.50 rows=235,115 width=26) (actual time=338.144..385.663 rows=342,454 loops=1)

  • Sort Key: segmented_list_items_1.list_item_id, events.id
  • Sort Method: external merge Disk: 9,080kB
23. 81.676 201.584 ↓ 1.5 342,454 1

Hash Left Join (cost=5,761.92..13,896.92 rows=235,115 width=26) (actual time=31.805..201.584 rows=342,454 loops=1)

  • Hash Cond: ((segmented_list_items_1.list_item_id = event_ps_1.list_item_id) AND (event_parts_1.event_id = event_ps_1.event_id))
24. 68.042 107.205 ↓ 1.5 342,454 1

Hash Right Join (cost=1,078.43..7,979.08 rows=235,115 width=17) (actual time=18.977..107.205 rows=342,454 loops=1)

  • Hash Cond: (segmented_list_items_1.segmented_list_id = segmented_lists_1.id)
25. 20.257 20.257 ↑ 1.0 205,953 1

Seq Scan on segmented_list_items segmented_list_items_1 (cost=0.00..3,777.00 rows=206,000 width=16) (actual time=0.009..20.257 rows=205,953 loops=1)

26. 1.566 18.906 ↓ 1.0 7,428 1

Hash (cost=986.07..986.07 rows=7,389 width=17) (actual time=18.906..18.906 rows=7,428 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 455kB
27. 1.693 17.340 ↓ 1.0 7,428 1

Hash Left Join (cost=594.89..986.07 rows=7,389 width=17) (actual time=10.249..17.340 rows=7,428 loops=1)

  • Hash Cond: (event_parts_1.people_segmented_list_id = segmented_lists_1.id)
28. 1.655 13.133 ↓ 1.0 7,428 1

Hash Left Join (cost=220.23..592.00 rows=7,389 width=17) (actual time=7.685..13.133 rows=7,428 loops=1)

  • Hash Cond: (events.id = event_settings_1.event_id)
29. 2.867 10.386 ↓ 1.0 7,428 1

Hash Right Join (cost=104.67..457.00 rows=7,389 width=16) (actual time=6.573..10.386 rows=7,428 loops=1)

  • Hash Cond: (event_parts_1.event_id = events.id)
30. 0.969 0.969 ↑ 1.0 7,371 1

Seq Scan on event_parts event_parts_1 (cost=0.00..332.89 rows=7,389 width=12) (actual time=0.011..0.969 rows=7,371 loops=1)

31. 0.514 6.550 ↓ 1.0 1,912 1

Hash (cost=80.85..80.85 rows=1,905 width=4) (actual time=6.550..6.550 rows=1,912 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 84kB
32. 6.036 6.036 ↓ 1.0 1,912 1

Index Only Scan using events_pkey on events (cost=0.28..80.85 rows=1,905 width=4) (actual time=0.018..6.036 rows=1,912 loops=1)

  • Heap Fetches: 63
33. 0.397 1.092 ↓ 1.0 1,855 1

Hash (cost=92.66..92.66 rows=1,832 width=5) (actual time=1.092..1.092 rows=1,855 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 89kB
34. 0.695 0.695 ↓ 1.0 1,855 1

Seq Scan on event_settings event_settings_1 (cost=0.00..92.66 rows=1,832 width=5) (actual time=0.009..0.695 rows=1,855 loops=1)

  • Filter: ((list_kind)::text = 'people'::text)
  • Rows Removed by Filter: 1,672
35. 1.285 2.514 ↓ 1.0 6,492 1

Hash (cost=293.74..293.74 rows=6,474 width=8) (actual time=2.514..2.514 rows=6,492 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 318kB
36. 1.229 1.229 ↓ 1.0 6,492 1

Seq Scan on segmented_lists segmented_lists_1 (cost=0.00..293.74 rows=6,474 width=8) (actual time=0.007..1.229 rows=6,492 loops=1)

37. 5.258 12.703 ↓ 1.0 26,908 1

Hash (cost=4,285.60..4,285.60 rows=26,526 width=17) (actual time=12.703..12.703 rows=26,908 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,413kB
38. 7.445 7.445 ↓ 1.0 26,908 1

Index Scan using index_participant_statuses_on_event_part_id on participant_statuses event_ps_1 (cost=0.42..4,285.60 rows=26,526 width=17) (actual time=0.013..7.445 rows=26,908 loops=1)

  • Index Cond: (event_part_id IS NULL)
Planning time : 29.673 ms
Execution time : 1,053.104 ms