explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NTUD

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=1,963,602.53..1,963,660.61 rows=1,936 width=74) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=1,963,602.53..1,963,607.37 rows=1,936 width=74) (actual rows= loops=)

  • Sort Key: hopempl.nompre, e.matri, e.nompre, (max(0)), h_1.sjrsjcum, h_1.ijrscoprin, h_1.sjrscpan, h_1.ijrscoanci, h_1.ijrscofrac, h_1.sjrsrsem, h_1.sjrsrsca
3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,963,419.40..1,963,496.84 rows=1,936 width=74) (actual rows= loops=)

  • Group Key: hopempl.nompre, e.matri, e.nompre, h_1.sjrsjcum, h_1.ijrscoprin, h_1.sjrscpan, h_1.ijrscoanci, h_1.ijrscofrac, h_1.sjrsrsem, h_1.sjrsrsca
4. 0.000 0.000 ↓ 0.0

Sort (cost=1,963,419.40..1,963,424.24 rows=1,936 width=70) (actual rows= loops=)

  • Sort Key: hopempl.nompre, e.matri, e.nompre, h_1.sjrsjcum, h_1.ijrscoprin, h_1.sjrscpan, h_1.ijrscoanci, h_1.ijrscofrac, h_1.sjrsrsem, h_1.sjrsrsca
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,776,924.85..1,963,313.70 rows=1,936 width=70) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Only Scan using i_hoprols on hoprols (cost=0.42..8.44 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((matri = '04019014'::text) AND (role = '9001'::text) AND (horsect = 'HYPFRA0940051'::text))
7. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,776,924.43..1,963,285.90 rows=1,936 width=83) (actual rows= loops=)

  • Hash Cond: ((h_1.matri)::text = (e.matri)::text)
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,753,185.11..1,939,324.26 rows=55,006 width=28) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=1,753,184.54..1,753,953.64 rows=30,764 width=12) (actual rows= loops=)

  • Group Key: hophjoun.matri
10. 0.000 0.000 ↓ 0.0

Sort (cost=1,753,184.54..1,753,338.36 rows=61,528 width=12) (actual rows= loops=)

  • Sort Key: hophjoun.matri
11. 0.000 0.000 ↓ 0.0

Gather (cost=1,741,829.87..1,748,290.31 rows=61,528 width=12) (actual rows= loops=)

  • Workers Planned: 2
12. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=1,740,829.87..1,741,137.51 rows=30,764 width=12) (actual rows= loops=)

  • Group Key: hophjoun.matri
13. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on hophjoun (cost=166,005.87..1,727,452.37 rows=2,675,500 width=12) (actual rows= loops=)

  • Recheck Cond: ((dat >= '2019-08-05'::date) AND (dat <= '2019-11-12'::date))
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on i_hophjoun2 (cost=0.00..164,400.57 rows=6,421,200 width=0) (actual rows= loops=)

  • Index Cond: ((dat >= '2019-08-05'::date) AND (dat <= '2019-11-12'::date))
15. 0.000 0.000 ↓ 0.0

Index Scan using i_hophjoup on hophjoup h_1 (cost=0.57..11.46 rows=2 width=32) (actual rows= loops=)

  • Index Cond: (((matri)::text = (hophjoun.matri)::text) AND (dat = (max(hophjoun.dat))))
16. 0.000 0.000 ↓ 0.0

Hash (cost=23,715.12..23,715.12 rows=1,936 width=63) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Gather (cost=1,074.09..23,715.12 rows=1,936 width=63) (actual rows= loops=)

  • Workers Planned: 1
18. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=74.09..22,521.52 rows=1,139 width=63) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=73.67..15,560.42 rows=1,139 width=42) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on hophjoun h (cost=73.25..7,626.15 rows=1,139 width=21) (actual rows= loops=)

  • Recheck Cond: (((sectori)::text = 'HYPFRA0940051'::text) AND (dat >= '2019-08-05'::date) AND (dat <= '2019-11-12'::date))
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on i_hophjoun5 (cost=0.00..72.77 rows=1,936 width=0) (actual rows= loops=)

  • Index Cond: (((sectori)::text = 'HYPFRA0940051'::text) AND (dat >= '2019-08-05'::date) AND (dat <= '2019-11-12'::date))
22. 0.000 0.000 ↓ 0.0

Index Scan using i_hopempl4 on hopempl e (cost=0.42..6.97 rows=1 width=29) (actual rows= loops=)

  • Index Cond: ((matri)::text = (h.matri)::text)
23. 0.000 0.000 ↓ 0.0

Index Scan using i_hopempl4 on hopempl (cost=0.42..6.11 rows=1 width=29) (actual rows= loops=)

  • Index Cond: ((e.matri)::text = (matri)::text)