explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WcSo : initial

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 20,578.565 88,418.153 ↓ 2.0 1,640,588 1

Hash Left Join (cost=3,775.83..50,716,387.89 rows=816,214 width=1,909) (actual time=510.430..88,418.153 rows=1,640,588 loops=1)

  • Hash Cond: ((activity.reference_activity_response_id = reference_activity_response.id) AND (reference_activity_response_value.reference_activity_response_id = reference_activity_response.id))
2. 1,506.893 3,855.524 ↓ 2.0 1,640,588 1

Hash Left Join (cost=3,774.75..16,424.34 rows=816,214 width=1,565) (actual time=505.751..3,855.524 rows=1,640,588 loops=1)

  • Hash Cond: (activity_response.reference_activity_response_value_id = reference_activity_response_value.id)
3. 1,070.725 2,348.609 ↓ 2.0 1,640,588 1

Hash Join (cost=3,773.53..13,372.52 rows=816,214 width=1,509) (actual time=505.705..2,348.609 rows=1,640,588 loops=1)

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

Hash Left Join (cost=3,771.76..11,389.93 rows=144,060 width=989) (actual time=504.697..1,276.954 rows=276,832 loops=1)

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

Hash Right Join (cost=3,748.94..10,985.61 rows=144,060 width=810) (actual time=500.107..998.572 rows=276,832 loops=1)

  • Hash Cond: (activity_response.collaborator_integration_program_id = cp.id)
6. 127.434 127.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.016..127.434 rows=288,078 loops=1)

7. 8.178 500.040 ↓ 1.9 6,588 1

Hash (cost=3,705.67..3,705.67 rows=3,462 width=790) (actual time=500.040..500.040 rows=6,588 loops=1)

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

Nested Loop (cost=222.02..3,705.67 rows=3,462 width=790) (actual time=20.101..491.862 rows=6,588 loops=1)

9. 3.222 48.625 ↓ 1.9 6,588 1

Hash Join (cost=221.73..2,035.77 rows=3,462 width=774) (actual time=19.001..48.625 rows=6,588 loops=1)

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

Hash Join (cost=220.61..2,019.15 rows=3,462 width=616) (actual time=18.922..45.360 rows=6,588 loops=1)

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

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

12. 3.497 18.846 ↓ 1.9 6,588 1

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

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

Hash Join (cost=1.10..177.34 rows=3,462 width=572) (actual time=1.025..15.349 rows=6,588 loops=1)

  • Hash Cond: (cp.integration_program_id = prog.id)
14. 11.088 11.088 ↑ 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.008..11.088 rows=6,923 loops=1)

15. 0.013 0.993 ↑ 1.0 3 1

Hash (cost=1.06..1.06 rows=3 width=524) (actual time=0.992..0.993 rows=3 loops=1)

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

Seq Scan on integration_program prog (cost=0.00..1.06 rows=3 width=524) (actual time=0.978..0.980 rows=3 loops=1)

  • Filter: enable
  • Rows Removed by Filter: 3
17. 0.015 0.043 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=162) (actual time=0.043..0.043 rows=5 loops=1)

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

Seq Scan on concession (cost=0.00..1.05 rows=5 width=162) (actual time=0.024..0.028 rows=5 loops=1)

19. 434.808 434.808 ↑ 1.0 1 6,588

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

  • Index Cond: (id_people = collaborator.id_people)
20. 0.281 4.573 ↑ 1.0 481 1

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

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

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

  • Filter: (NOT is_disabled)
22. 0.020 0.930 ↑ 1.0 34 1

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

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

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

24. 0.009 0.022 ↑ 1.0 10 1

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

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

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

26. 0.013 1.132 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=150) (actual time=1.132..1.132 rows=3 loops=1)

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

Seq Scan on reference_activity_response (cost=0.00..1.03 rows=3 width=150) (actual time=1.118..1.119 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. 3,281.176 11,484.116 ↑ 1.0 1 1,640,588

Nested Loop (cost=0.58..16.62 rows=1 width=4) (actual time=0.006..0.007 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.008..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.005..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 : 235.541 ms