explain.depesz.com

PostgreSQL's explain analyze made readable

Result: svTi

Settings
# exclusive inclusive rows x rows loops node
1. 702.341 8,381.022 ↑ 1.0 423,444 1

Hash Join (cost=148,187.65..515,779.51 rows=423,444 width=928) (actual time=2,645.670..8,381.022 rows=423,444 loops=1)

  • Hash Cond: (claims_1.staffing_users_id = staffing_users.id)
2. 252.904 7,653.616 ↑ 1.0 423,444 1

Hash Left Join (cost=145,346.56..498,647.18 rows=423,444 width=774) (actual time=2,620.479..7,653.616 rows=423,444 loops=1)

  • Hash Cond: (events_staffing_days_positions.staffing_positions_id = staffing_positions.id)
3. 1,017.318 7,400.622 ↑ 1.0 423,444 1

Hash Join (cost=145,336.06..492,831.41 rows=423,444 width=752) (actual time=2,620.372..7,400.622 rows=423,444 loops=1)

  • Hash Cond: (claims_1.events_id = events_venues.events_id)
4. 1,072.847 4,402.271 ↑ 1.0 423,444 1

Hash Left Join (cost=51,621.83..308,517.82 rows=423,444 width=732) (actual time=630.853..4,402.271 rows=423,444 loops=1)

  • Hash Cond: (claims_1.events_staffing_days_positions_id = events_staffing_days_positions.id)
5. 220.681 2,731.520 ↑ 1.0 423,444 1

Hash Join (cost=1,848.94..170,885.93 rows=423,444 width=728) (actual time=32.090..2,731.520 rows=423,444 loops=1)

  • Hash Cond: (claims_1.payroll_periods_id = payroll_periods.id)
6. 194.892 2,510.781 ↑ 1.0 423,444 1

Hash Join (cost=1,843.24..165,057.87 rows=423,444 width=720) (actual time=32.020..2,510.781 rows=423,444 loops=1)

  • Hash Cond: (claims_1.claim_statuses_id = claim_statuses.id)
7. 296.974 2,315.880 ↑ 1.0 423,444 1

Hash Join (cost=1,842.11..159,234.38 rows=423,444 width=656) (actual time=32.005..2,315.880 rows=423,444 loops=1)

  • Hash Cond: ((claims_1.claim_types_id = claim_types.id) AND (events.programs_id = programs.id))
8. 662.248 1,987.071 ↑ 1.0 423,444 1

Merge Join (cost=72.85..117,237.94 rows=423,444 width=523) (actual time=0.110..1,987.071 rows=423,444 loops=1)

  • Merge Cond: (claims_1.events_id = events.id)
9. 455.626 455.626 ↑ 1.0 423,444 1

Index Scan using claims_events_id_idx on claims claims_1 (cost=0.42..43,146.11 rows=423,444 width=466) (actual time=0.008..455.626 rows=423,444 loops=1)

10. 869.197 869.197 ↓ 1.2 1,230,104 1

Index Scan using events_pkey on events (cost=0.43..66,221.03 rows=1,058,835 width=57) (actual time=0.006..869.197 rows=1,230,104 loops=1)

11. 7.294 31.835 ↑ 1.0 21,536 1

Hash (cost=1,446.22..1,446.22 rows=21,536 width=141) (actual time=31.835..31.835 rows=21,536 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2508kB
12. 9.263 24.541 ↑ 1.0 21,536 1

Hash Right Join (cost=627.59..1,446.22 rows=21,536 width=141) (actual time=14.065..24.541 rows=21,536 loops=1)

  • Hash Cond: ((claim_types_programs.claim_types_id = claim_types.id) AND (claim_types_programs.programs_id = programs.id))
13. 1.285 1.285 ↑ 1.0 7,006 1

Seq Scan on claim_types_programs (cost=0.00..153.06 rows=7,006 width=45) (actual time=0.013..1.285 rows=7,006 loops=1)

14. 7.522 13.993 ↑ 1.0 21,536 1

Hash (cost=304.55..304.55 rows=21,536 width=104) (actual time=13.993..13.993 rows=21,536 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2412kB
15. 4.270 6.471 ↑ 1.0 21,536 1

Nested Loop (cost=1.07..304.55 rows=21,536 width=104) (actual time=0.025..6.471 rows=21,536 loops=1)

16. 0.182 0.182 ↑ 1.0 673 1

Seq Scan on programs (cost=0.00..32.73 rows=673 width=36) (actual time=0.003..0.182 rows=673 loops=1)

17. 1.987 2.019 ↑ 1.0 32 673

Materialize (cost=1.07..2.70 rows=32 width=68) (actual time=0.000..0.003 rows=32 loops=673)

18. 0.016 0.032 ↑ 1.0 32 1

Hash Join (cost=1.07..2.54 rows=32 width=68) (actual time=0.017..0.032 rows=32 loops=1)

  • Hash Cond: (claim_types.claim_categories_id = claim_categories.id)
19. 0.010 0.010 ↑ 1.0 32 1

Seq Scan on claim_types (cost=0.00..1.32 rows=32 width=40) (actual time=0.005..0.010 rows=32 loops=1)

20. 0.004 0.006 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=36) (actual time=0.005..0.006 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on claim_categories (cost=0.00..1.03 rows=3 width=36) (actual time=0.002..0.002 rows=3 loops=1)

22. 0.004 0.009 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=68) (actual time=0.009..0.009 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
23. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on claim_statuses (cost=0.00..1.06 rows=6 width=68) (actual time=0.003..0.005 rows=6 loops=1)

24. 0.025 0.058 ↑ 1.0 120 1

Hash (cost=4.20..4.20 rows=120 width=12) (actual time=0.058..0.058 rows=120 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
25. 0.033 0.033 ↑ 1.0 120 1

Seq Scan on payroll_periods (cost=0.00..4.20 rows=120 width=12) (actual time=0.008..0.033 rows=120 loops=1)

26. 329.508 597.904 ↑ 1.0 1,100,884 1

Hash (cost=31,710.84..31,710.84 rows=1,100,884 width=8) (actual time=597.904..597.904 rows=1,100,884 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3723kB
27. 268.396 268.396 ↑ 1.0 1,100,884 1

Seq Scan on events_staffing_days_positions (cost=0.00..31,710.84 rows=1,100,884 width=8) (actual time=0.018..268.396 rows=1,100,884 loops=1)

28. 357.189 1,981.033 ↑ 1.0 1,059,209 1

Hash (cost=74,267.10..74,267.10 rows=1,059,210 width=24) (actual time=1,981.033..1,981.033 rows=1,059,209 loops=1)

  • Buckets: 65536 Batches: 32 Memory Usage: 2253kB
29. 866.041 1,623.844 ↑ 1.0 1,059,209 1

Hash Join (cost=33,199.87..74,267.10 rows=1,059,210 width=24) (actual time=538.497..1,623.844 rows=1,059,209 loops=1)

  • Hash Cond: (events_venues.venues_profiles_id = venues_profiles.id)
30. 219.491 219.491 ↑ 1.0 1,059,210 1

Seq Scan on events_venues (cost=0.00..17,244.10 rows=1,059,210 width=8) (actual time=0.011..219.491 rows=1,059,210 loops=1)

31. 48.760 538.312 ↑ 1.0 167,589 1

Hash (cost=30,120.27..30,120.27 rows=167,728 width=20) (actual time=538.312..538.312 rows=167,589 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 2735kB
32. 278.349 489.552 ↑ 1.0 167,589 1

Hash Join (cost=5,875.88..30,120.27 rows=167,728 width=20) (actual time=95.488..489.552 rows=167,589 loops=1)

  • Hash Cond: (venues.id = venues_profiles.venues_id)
33. 115.974 115.974 ↑ 1.0 415,935 1

Seq Scan on venues (cost=0.00..15,475.35 rows=415,935 width=20) (actual time=0.008..115.974 rows=415,935 loops=1)

34. 38.973 95.229 ↑ 1.0 167,728 1

Hash (cost=3,123.28..3,123.28 rows=167,728 width=8) (actual time=95.229..95.229 rows=167,728 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2655kB
35. 56.256 56.256 ↑ 1.0 167,728 1

Seq Scan on venues_profiles (cost=0.00..3,123.28 rows=167,728 width=8) (actual time=0.007..56.256 rows=167,728 loops=1)

36. 0.050 0.090 ↑ 1.0 289 1

Hash (cost=6.89..6.89 rows=289 width=26) (actual time=0.089..0.090 rows=289 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
37. 0.040 0.040 ↑ 1.0 289 1

Seq Scan on staffing_positions (cost=0.00..6.89 rows=289 width=26) (actual time=0.008..0.040 rows=289 loops=1)

38. 12.461 25.065 ↑ 1.0 42,004 1

Hash (cost=2,316.04..2,316.04 rows=42,004 width=18) (actual time=25.065..25.065 rows=42,004 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2667kB
39. 12.604 12.604 ↑ 1.0 42,004 1

Seq Scan on staffing_users (cost=0.00..2,316.04 rows=42,004 width=18) (actual time=0.017..12.604 rows=42,004 loops=1)