explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mC7R

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

GroupAggregate (cost=47,799.74..47,799.76 rows=1 width=46) (actual rows= loops=)

  • Group Key: kat.nazwa, ((((lzat.pe_nazwisko)::text || ' '::text) || (lzat.pe_imie)::text))
2. 0.000 0.000 ↓ 0.0

Sort (cost=47,799.74..47,799.74 rows=1 width=46) (actual rows= loops=)

  • Sort Key: kat.nazwa, ((((lzat.pe_nazwisko)::text || ' '::text) || (lzat.pe_imie)::text))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,914.67..47,799.73 rows=1 width=46) (actual rows= loops=)

  • Join Filter: ((bopis.zatwierdil)::text = (lzat.installid)::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=39,914.67..47,796.27 rows=1 width=34) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=39,914.67..47,796.17 rows=1 width=46) (actual rows= loops=)

  • Join Filter: ((bopis.badanie_rel)::text = (bs.installid)::text)
6. 0.000 0.000 ↓ 0.0

Merge Join (cost=21,845.02..24,155.12 rows=1 width=28) (actual rows= loops=)

  • Merge Cond: ((bo_1.badanie_rel)::text = (bopis.badanie_rel)::text)
  • Join Filter: (bopis.wersja = (max(bo_1.wersja)))
7. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=14,341.00..15,739.29 rows=72,943 width=16) (actual rows= loops=)

  • Group Key: bo_1.badanie_rel
8. 0.000 0.000 ↓ 0.0

Sort (cost=14,341.00..14,563.95 rows=89,181 width=16) (actual rows= loops=)

  • Sort Key: bo_1.badanie_rel
9. 0.000 0.000 ↓ 0.0

Seq Scan on bopis bo_1 (cost=0.00..7,008.34 rows=89,181 width=16) (actual rows= loops=)

  • Filter: (zatwierdil IS NOT NULL)
10. 0.000 0.000 ↓ 0.0

Sort (cost=7,504.02..7,504.03 rows=1 width=27) (actual rows= loops=)

  • Sort Key: bopis.badanie_rel
11. 0.000 0.000 ↓ 0.0

Seq Scan on bopis (cost=0.00..7,504.01 rows=1 width=27) (actual rows= loops=)

  • Filter: ((dataopisu >= '2019-10-01 00:00:00'::timestamp without time zone) AND (dataopisu <= '2019-10-31 23:59:59'::timestamp without time zone))
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=18,069.65..23,225.54 rows=33,241 width=78) (actual rows= loops=)

  • Hash Cond: ((bj.kategoria_installid)::text = (kat.installid)::text)
13. 0.000 0.000 ↓ 0.0

Hash Join (cost=18,043.39..22,742.21 rows=33,241 width=53) (actual rows= loops=)

  • Hash Cond: ((bs.statusy_lista_id)::text = (st.installid)::text)
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=18,041.69..22,283.45 rows=33,241 width=57) (actual rows= loops=)

  • Hash Cond: ((br.installid)::text = (bs.installid)::text)
15. 0.000 0.000 ↓ 0.0

Seq Scan on brejestracja br (cost=0.00..2,657.49 rows=100,149 width=23) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=17,626.18..17,626.18 rows=33,241 width=45) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,852.69..17,626.18 rows=33,241 width=45) (actual rows= loops=)

  • Hash Cond: ((bod.installid)::text = (bs.installid)::text)
18. 0.000 0.000 ↓ 0.0

Seq Scan on bopisdla bod (cost=0.00..2,190.48 rows=100,048 width=16) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=13,436.92..13,436.92 rows=33,261 width=33) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,403.69..13,436.92 rows=33,261 width=33) (actual rows= loops=)

  • Hash Cond: ((bs.installid)::text = (bj.installid)::text)
21. 0.000 0.000 ↓ 0.0

Seq Scan on bstatus bs (cost=0.00..2,200.08 rows=100,108 width=16) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=9,987.93..9,987.93 rows=33,261 width=17) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash Join (cost=5,908.32..9,987.93 rows=33,261 width=17) (actual rows= loops=)

  • Hash Cond: ((bj.badania_installid)::text = (b.installid)::text)
24. 0.000 0.000 ↓ 0.0

Seq Scan on badaniejedn bj (cost=0.00..3,372.82 rows=99,782 width=29) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=5,490.62..5,490.62 rows=33,416 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash Join (cost=2.14..5,490.62 rows=33,416 width=12) (actual rows= loops=)

  • Hash Cond: (((b.pracownia)::text = (pr.installid)::text) AND ((b.gabinet)::text = (g.installid)::text))
27. 0.000 0.000 ↓ 0.0

Seq Scan on badania b (cost=0.00..4,402.47 rows=100,247 width=148) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=2.11..2.11 rows=2 width=234) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.04..2.11 rows=2 width=234) (actual rows= loops=)

  • Hash Cond: ((g.pracownia_installid)::text = (pr.installid)::text)
30. 0.000 0.000 ↓ 0.0

Seq Scan on gabinety g (cost=0.00..1.03 rows=3 width=156) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=1.02..1.02 rows=2 width=78) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on pracownie pr (cost=0.00..1.02 rows=2 width=78) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=1.31..1.31 rows=31 width=78) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on statusylista st (cost=0.00..1.31 rows=31 width=78) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=18.34..18.34 rows=634 width=46) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on kategorie kat (cost=0.00..18.34 rows=634 width=46) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Index Scan using hl7badanie_idx1 on hl7badanie hl7 (cost=0.00..0.09 rows=1 width=13) (actual rows= loops=)

  • Index Cond: ((badanie)::text = (bj.installid)::text)
38. 0.000 0.000 ↓ 0.0

Seq Scan on personel lzat (cost=0.00..3.44 rows=1 width=20) (actual rows= loops=)

  • Filter: ((((pe_nazwisko)::text || ' '::text) || (pe_imie)::text) = 'GROCHOWIEC MICHAŁ'::text)