explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W5Jq : Optimization for: full vaccum et reindex

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 20,843.939 86,436.163 ↓ 2.0 1,640,588 1

Hash Left Join (cost=3,777.10..50,716,231.72 rows=816,214 width=1,176) (actual time=127.091..86,436.163 rows=1,640,588 loops=1)

  • Hash Cond: (reference_activity_response_value.reference_activity_response_id = reference_activity_response.id)
2. 1,344.354 3,249.851 ↓ 2.0 1,640,588 1

Hash Left Join (cost=3,776.03..16,425.62 rows=816,214 width=938) (actual time=126.625..3,249.851 rows=1,640,588 loops=1)

  • Hash Cond: (activity_response.reference_activity_response_value_id = reference_activity_response_value.id)
3. 1,037.145 1,905.452 ↓ 2.0 1,640,588 1

Hash Join (cost=3,774.81..13,373.80 rows=816,214 width=882) (actual time=126.560..1,905.452 rows=1,640,588 loops=1)

  • Hash Cond: (prog.id = period.integration_program_id)
4. 288.244 868.242 ↓ 1.9 276,832 1

Hash Left Join (cost=3,773.04..11,391.21 rows=144,060 width=362) (actual time=126.476..868.242 rows=276,832 loops=1)

  • Hash Cond: (activity_response.activity_id = activity.id)
5. 375.211 578.928 ↓ 1.9 276,832 1

Hash Right Join (cost=3,750.22..10,986.89 rows=144,060 width=183) (actual time=125.374..578.928 rows=276,832 loops=1)

  • Hash Cond: (activity_response.collaborator_integration_program_id = cp.id)
6. 78.434 78.434 ↑ 1.0 288,078 1

Seq Scan on activity_response (cost=0.00..4,715.78 rows=288,078 width=24) (actual time=0.032..78.434 rows=288,078 loops=1)

7. 10.955 125.283 ↓ 1.9 6,588 1

Hash (cost=3,706.95..3,706.95 rows=3,462 width=163) (actual time=125.283..125.283 rows=6,588 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 1348kB
8. 14.867 114.328 ↓ 1.9 6,588 1

Nested Loop (cost=222.02..3,706.95 rows=3,462 width=163) (actual time=12.261..114.328 rows=6,588 loops=1)

9. 5.801 59.933 ↓ 1.9 6,588 1

Hash Join (cost=221.73..2,037.05 rows=3,462 width=147) (actual time=12.225..59.933 rows=6,588 loops=1)

  • Hash Cond: (prog.concession_id = concession.id_concession)
10. 25.428 54.101 ↓ 1.9 6,588 1

Hash Join (cost=220.61..2,019.15 rows=3,462 width=136) (actual time=12.178..54.101 rows=6,588 loops=1)

  • Hash Cond: (collaborator.id_people = cp.collaborator_id)
11. 16.555 16.555 ↑ 1.0 41,521 1

Seq Scan on collaborator (cost=0.00..1,608.21 rows=41,521 width=44) (actual time=0.028..16.555 rows=41,521 loops=1)

12. 4.430 12.118 ↓ 1.9 6,588 1

Hash (cost=177.34..177.34 rows=3,462 width=92) (actual time=12.118..12.118 rows=6,588 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 888kB
13. 5.849 7.688 ↓ 1.9 6,588 1

Hash Join (cost=1.10..177.34 rows=3,462 width=92) (actual time=0.069..7.688 rows=6,588 loops=1)

  • Hash Cond: (cp.integration_program_id = prog.id)
14. 1.816 1.816 ↑ 1.0 6,923 1

Seq Scan on collaborator_integration_program cp (cost=0.00..145.23 rows=6,923 width=48) (actual time=0.023..1.816 rows=6,923 loops=1)

15. 0.005 0.023 ↑ 1.0 3 1

Hash (cost=1.06..1.06 rows=3 width=44) (actual time=0.023..0.023 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.018 0.018 ↑ 1.0 3 1

Seq Scan on integration_program prog (cost=0.00..1.06 rows=3 width=44) (actual time=0.014..0.018 rows=3 loops=1)

  • Filter: enable
  • Rows Removed by Filter: 3
17. 0.008 0.031 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=15) (actual time=0.031..0.031 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.023 0.023 ↑ 1.0 5 1

Seq Scan on concession (cost=0.00..1.05 rows=5 width=15) (actual time=0.019..0.023 rows=5 loops=1)

19. 39.528 39.528 ↑ 1.0 1 6,588

Index Scan using abstractpeople_pkey on abstractpeople (cost=0.29..0.48 rows=1 width=20) (actual time=0.006..0.006 rows=1 loops=6,588)

  • Index Cond: (id_people = collaborator.id_people)
20. 0.535 1.070 ↑ 1.0 481 1

Hash (cost=16.81..16.81 rows=481 width=179) (actual time=1.070..1.070 rows=481 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 92kB
21. 0.535 0.535 ↑ 1.0 481 1

Seq Scan on activity (cost=0.00..16.81 rows=481 width=179) (actual time=0.023..0.535 rows=481 loops=1)

  • Filter: (NOT is_disabled)
22. 0.023 0.065 ↑ 1.0 34 1

Hash (cost=1.34..1.34 rows=34 width=528) (actual time=0.065..0.065 rows=34 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
23. 0.042 0.042 ↑ 1.0 34 1

Seq Scan on period (cost=0.00..1.34 rows=34 width=528) (actual time=0.028..0.042 rows=34 loops=1)

24. 0.019 0.045 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=56) (actual time=0.045..0.045 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.026 0.026 ↑ 1.0 10 1

Seq Scan on reference_activity_response_value (cost=0.00..1.10 rows=10 width=56) (actual time=0.020..0.026 rows=10 loops=1)

26. 0.014 0.029 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=44) (actual time=0.029..0.029 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.015 0.015 ↑ 1.0 3 1

Seq Scan on reference_activity_response (cost=0.00..1.03 rows=3 width=44) (actual time=0.012..0.015 rows=3 loops=1)

28.          

SubPlan (forHash Left Join)

29. 6,562.352 6,562.352 ↑ 1.0 1 1,640,588

Index Scan using abstractpeople_pkey on abstractpeople jf (cost=0.29..8.31 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=1,640,588)

  • Index Cond: (id_people = collaborator.id_people)
  • Filter: (birth_name IS NOT NULL)
  • Rows Removed by Filter: 0
30. 1,640.588 9,843.528 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.58..16.62 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=1,640,588)

31. 4,921.764 4,921.764 ↑ 1.0 1 1,640,588

Index Scan using idx_d20dd34d43ac3d0e on genealogy (cost=0.29..8.31 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1,640,588)

  • Index Cond: (id_collaborator = collaborator.id_people)
32. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using genealogy_pkey on genealogy niv0 (cost=0.29..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_genealogy = genealogy.id_tutor)
33. 1,640.588 13,124.704 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.87..17.05 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1,640,588)

34. 1,640.588 8,202.940 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.58..16.62 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=1,640,588)

35. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using idx_d20dd34d43ac3d0e on genealogy genealogy_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_collaborator = collaborator.id_people)
36. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using genealogy_pkey on genealogy niv0_1 (cost=0.29..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_genealogy = genealogy_1.id_tutor)
37. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using collaborator_pkey on collaborator parrain (cost=0.29..0.44 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_people = niv0_1.id_collaborator)
38. 0.000 11,484.116 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.87..17.05 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1,640,588)

39. 1,640.588 8,202.940 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.58..16.62 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=1,640,588)

40. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using idx_d20dd34d43ac3d0e on genealogy genealogy_2 (cost=0.29..8.31 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_collaborator = collaborator.id_people)
41. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using genealogy_pkey on genealogy niv0_2 (cost=0.29..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_genealogy = genealogy_2.id_tutor)
42. 3,281.176 3,281.176 ↑ 1.0 1 1,640,588

Index Scan using collaborator_pkey on collaborator parrain_1 (cost=0.29..0.44 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,640,588)

  • Index Cond: (id_people = niv0_2.id_collaborator)
43. 11,484.116 11,484.116 ↑ 1.0 1 1,640,588

Seq Scan on constellation (cost=0.00..1.54 rows=1 width=24) (actual time=0.005..0.007 rows=1 loops=1,640,588)

  • Filter: (id = collaborator.id_constellation)
  • Rows Removed by Filter: 42
44. 9,843.528 9,843.528 ↑ 1.0 1 1,640,588

Seq Scan on constellation constellation_1 (cost=0.00..1.54 rows=1 width=146) (actual time=0.004..0.006 rows=1 loops=1,640,588)

  • Filter: (id = collaborator.id_constellation)
  • Rows Removed by Filter: 42
Planning time : 26.755 ms