explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r5bf

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

Limit (cost=3,523,410.05..3,523,410.07 rows=1 width=78) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=3,523,410.05..3,523,410.07 rows=1 width=78) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=3,523,410.05..3,523,410.05 rows=1 width=78) (actual rows= loops=)

  • Sort Key: e.matri, e.nompre, e.datcalc, h_1.sjrrpsbc, (sum(h_3.sjqjourrep)), h_1.ijrtteffeh, h_1.sjrmodu, e.seiactprin, h_2.sjqentr1ec
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.96..3,523,410.04 rows=1 width=78) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.39..3,523,403.94 rows=1 width=55) (actual rows= loops=)

  • Join Filter: ((e.matri)::text = (h_3.matri)::text)
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.83..11,721.66 rows=1 width=47) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.26..11,715.56 rows=1 width=37) (actual rows= loops=)

  • Join Filter: ((h.dat >= c.datdeb) AND (h.dat <= c.datfin) AND ((h.matri)::text = (c.matri)::text))
8. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=2.26..5,411.99 rows=1 width=58) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..5,382.30 rows=1 width=49) (actual rows= loops=)

  • Join Filter: ((h.sectori)::text = (hoprols.horsect)::text)
10. 0.000 0.000 ↓ 0.0

Seq Scan on hoprols (cost=0.00..5,307.38 rows=3 width=14) (actual rows= loops=)

  • Filter: (((matri)::text = '04521001'::text) AND ((role)::text = '9001'::text))
11. 0.000 0.000 ↓ 0.0

Materialize (cost=0.98..74.71 rows=5 width=62) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.98..74.69 rows=5 width=62) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using i_hopempl4 on hopempl e (cost=0.42..42.02 rows=5 width=37) (actual rows= loops=)

  • Index Cond: ((matri)::text = ANY ('{04521017,04521018,04521019,04521020,04521021}'::text[]))
14. 0.000 0.000 ↓ 0.0

Index Scan using i_hophjoun on hophjoun h (cost=0.57..12.50 rows=2 width=25) (actual rows= loops=)

  • Index Cond: (((matri)::text = (e.matri)::text) AND (dat = '2020-01-06'::date))
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..29.68 rows=1 width=9) (actual rows= loops=)

  • Join Filter: ((d.dat >= po.datdebut) AND (d.dat <= po.datfin) AND ((pqua.codequal)::text = (po.codequal)::text))
16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..21.36 rows=1 width=36) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..14.30 rows=1 width=19) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using i_plppqua on plppqua pqua (cost=0.42..7.21 rows=1 width=31) (actual rows= loops=)

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

Index Scan using i_cmpdates on cmpdates d (cost=0.29..7.08 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((dat >= pqua.datdeb) AND (dat <= pqua.datfin) AND (dat = '2020-01-06'::date))
  • Filter: ("substring"((pqua.jourapplic)::text, (joursem)::integer, 1) = 'X'::text)
20. 0.000 0.000 ↓ 0.0

Index Only Scan using i_plplstpost on plplstpost b (cost=0.28..7.06 rows=1 width=17) (actual rows= loops=)

  • Index Cond: ((matri = '04521001'::text) AND (role = '9001'::text) AND (codequal = (pqua.codequal)::text))
21. 0.000 0.000 ↓ 0.0

Index Scan using i_plppost on plppost po (cost=0.29..8.30 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (((codelieu)::text = (b.codelieu)::text) AND ((codequal)::text = (b.codequal)::text))
22. 0.000 0.000 ↓ 0.0

Seq Scan on hopctra c (cost=0.00..5,142.34 rows=66,356 width=16) (actual rows= loops=)

  • Filter: (((typeplan)::text <> '0'::text) AND ((typeplan)::text <> 'C'::text))
23. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (((e.matri)::text = (matri)::text) AND (dat = '2020-01-12'::date))
24. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.57..3,510,854.84 rows=36,775 width=16) (actual rows= loops=)

  • Group Key: h_3.matri
25. 0.000 0.000 ↓ 0.0

Index Scan using i_hophjoup on hophjoup h_3 (cost=0.57..3,508,682.06 rows=361,005 width=10) (actual rows= loops=)

  • Index Cond: ((dat >= '2020-01-06'::date) AND (dat <= '2020-01-12'::date))
26. 0.000 0.000 ↓ 0.0

Index Scan using i_hophjoup on hophjoup h_2 (cost=0.57..11.63 rows=2 width=10) (actual rows= loops=)

  • Index Cond: (((e.matri)::text = (matri)::text) AND (dat = '2020-01-06'::date))